Skip to content

The status line takes back what is no longer true - #224

Merged
dmitrat merged 1 commit into
mainfrom
studio/status-line
Aug 19, 2026
Merged

dmitrat merged 1 commit into
mainfrom
studio/status-line

Conversation

@dmitrat

@dmitrat dmitrat commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Found by clicking through the application before a release: with no editor open anywhere, the line read Editing table: Products. The tab had been opened and closed again, and the sentence stayed behind it.

The distinction

Most of what this line carries is an event - executed in 9 ms, loaded 28 rows - and an event stays true after it happens. That is why the line is not simply cleared whenever something changes: clearing it would throw away the answer to the last thing the user did.

Editing table X is not an event. It is a state, it belongs to the tab, and it ends when the tab does.

The fix

A state is said with an owner - SayThisWhile(tab, …) - and closing that tab takes it back. The owner is matched by reference and by comparing the line to what was set, so a message that arrived from anywhere else in the meantime is never taken away by the owner closing afterwards.

The guard

TheStatusLineTakesBackWhatIsNoLongerTrueTests, three cases, two of them in the other direction:

  • closing the editor takes Editing table Customers off the line;
  • a message that arrived after the editor opened stays when the editor closes;
  • closing a query tab leaves what it reported on the line.

Red with the call removed from the close path.

Studio: 1030 green.

🤖 Generated with Claude Code

Found by clicking through the application before a release: with no editor open
anywhere, the line read "Editing table: Products". The tab had been opened and closed
again and the sentence stayed behind it.

Most of what this line carries is an EVENT - "executed in 9 ms", "loaded 28 rows" -
and an event stays true after it happens, which is why the line is not simply cleared
whenever something changes. "Editing table X" is not an event. It is a state, it
belongs to the tab, and it ends when the tab does.

So a state is said WITH AN OWNER: SayThisWhile(tab, ...) remembers who said it, and
closing that tab takes it back - by reference AND by comparing the line to what was
set, so a message that arrived from anywhere else in the meantime is never taken away
by the owner closing afterwards. Both of those are cases in the fixture, beside the
third: closing a query tab leaves what it reported on the line.

Red with the call removed from the close path.

Studio: 1030 green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dmitrat
dmitrat merged commit ac92696 into main Aug 19, 2026
1 check passed
@dmitrat
dmitrat deleted the studio/status-line branch August 19, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant