Repository navigation
Stop a normal quit from looking like 29 broken shells - #33
Merged
Merged
Conversation
Closing the app takes the backend with it, so all 29 shells report an exit at the same moment. The frontend read each one as "the shell died" and did what a terminal does: start it again. The backend was already gone, so the respawn failed, and after four failures in ten seconds the session wrote "The shell keeps exiting right after it starts" into its feed. That message is right for the case it was written for, a broken profile that really does kill the shell on startup. It was wrong here: the shell was fine, the app was quitting. One quit produced one block per project, and the blocks are persisted history, so the next launch restored them and every project came up red. Running any command cleared it, which is why it looked cosmetic. 257 of them had accumulated. Three changes. `beforeunload`/`pagehide` set an `unloading` flag that stops the respawn entirely, so the message is no longer written on a normal quit or an update. `statusOf` returns idle for a project the user has not worked in this session, because restored history is not this session's outcome and `touched` already recorded exactly that. And the note is not repeated when the last block is already the same note. Verified in a real build rather than under HMR: the app opened and closed, and the stored count stayed at 257 with nothing new written, while every project came up idle.
A chip was accent text on `edge`. On a dark window edge is the lightest surface we have, so the chip stood out; on a light one it is the darkest, which is how `resultUrl` ended up as mid-tone text on a mid-tone grey. The same two class names produced opposite results because the surface ramp runs in opposite directions. Measured over all six themes, accent on edge: 1.82 on our default dark and 1.56 on Sand, where a chip is meant to be read. Moving the chip to `well` and the ink to `accentFill` gives 4.45 and 2.36. `accentFill` is the accent itself on a dark theme, so nothing changes there beyond the surface; on a light one it is the deeper accent the filled controls already use, which is also the consistent choice.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closing the app takes the backend down with it, so every shell reports an exit at the same moment. The frontend read each one as a crash and did what a terminal does: respawn. The backend was already gone, so the respawn failed, and after four failures in ten seconds each session wrote "The shell keeps exiting right after it starts" into its feed.
Those blocks are persisted history, so the next launch restored them and every project came up red. Running any command cleared it, which is why it read as cosmetic. 257 had accumulated.
What changed
beforeunload/pagehideset anunloadingflag that stops the respawn entirely, so a normal quit or an update writes nothing.statusOfreturns idle for a project the user has not worked in this session: restored history is not this session's outcome, andtouchedalready records that.Also in here, unrelated but small: inline code chips were accent text on
edge, which inverts between light and dark because the surface ramp runs in opposite directions. Contrast measured over all six themes went from 1.82 (default dark) and 1.56 (Sand) to 4.45 and 2.36 by moving the chip towelland the ink toaccentFill.Verification
Verified in a real build rather than under HMR, since the bug is in the quit path: the app opened and closed, the stored count stayed at 257 with nothing new written, and every project came up idle.
🤖 Generated with Claude Code