Repository navigation
feat(app): read marks in light blue, and the side panel comes back with the bot - #52
Merged
Merged
Conversation
A message the bot has read showed its two check marks in the same dim color as "Delivered", so the two were hard to tell apart at a glance. The marks now take a new `--read` token, a lighter blue than `--work` (which already means a bot at work and a message being delivered). The word "Read" keeps the muted color of the other delivery lines: it is the word that states the state, the color only helps (spec 15.3). The blue chat apps use is too faint on the light theme (about 2:1), so the light theme gets a deeper tone. A test reads the tokens from index.css and checks 3:1 against canvas, panel and sunken in both themes.
The panel beside a bot's chat was local state of the bot's view, so switching to another bot and back lost it, and the owner had to open the browser again every time. The open panel is now kept per bot in the app store until the app closes, closed included: a panel the owner closed comes back closed. The panel that comes back is there at once, without sliding open (`PanelRestored`). Following the bot is unchanged and treats coming back as opening the bot: a browser the bot opened meanwhile stays behind its button, and what opens by itself on opening a bot, or starts after it, takes the place of the panel that came back. Spec 15.1 says so.
Merged
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two small app changes the owner asked for after using Botloft with real bots. One commit each.
Read marks in light blue
A message the bot has read showed
CheckCheckand "Read" intext-muted, the same dim color as "Delivered". Now the two marks are light blue, as in chat apps, and the word stays as it was.New token
--readinindex.css(text-read):#1787c9in the light theme,#5cc4f2in the dark one.--workwas not reused: it already means a bot at work and a message being delivered ("Delivering…" sits in the same line), and in the light theme it is a deep blue, not a light one.Contrast of the marks (an icon needs 3:1):
#1787c9#5cc4f2The blue chat apps use (
#53bdeb) gives 1.9 to 2.1 in the light theme, so the light theme has a deeper tone.The label keeps
text-muted(4.55:1 on the light canvas, 5.82:1 on the dark one): the word states the state, the color only helps (spec 15.3).Spec 9.1 and 15.3 describe it.
The side panel comes back with the bot
The open panel was local state in
BotView, which is remounted per bot, so switching to another bot and back lost it.panels,setPanel) until the app closes. Closed is kept too: a panel the owner closed comes back closed.PanelRestoredinpanelMotion.ts); one opened after that slides as before.useFollowBotis unchanged. Coming back counts as opening the bot: a browser the bot opened meanwhile stays behind its button, and what opens by itself when a bot is opened (a request for a hand still unanswered, a screen still being written) or starts after it takes the place of the panel that came back.One thing to decide, not changed here: a request for a hand that is still open reopens the browser every time the bot is opened, also after the owner closed that panel, and a screen still being written does the same for the design area. That is how it already worked; with the panel now coming back, it is the one case where a panel the owner closed opens again.
Tests
features/bots/panels.test.tsx(new): the panel comes back, each bot with its own, without sliding; closed stays closed; one that opened by itself comes back, also through the crew page; a browser opened while away stays behind its button and what the bot starts next still takes the panel's place. Three of the four fail onmain.ui/sidepanel.test.tsx: a restored panel is open at once and still slides closed.features/messages/messages.test.tsx: the marks taketext-readand the label does not; the token keeps 3:1 on every surface in both themes and stays lighter than--work(readsindex.css, so it is added totest.css.include).pnpm checkpasses (198 tests).Checked in the preview (
pnpm dev, FakeBotloft) in both themes: the marks, and the browser panel coming back live after switching bots.Nothing here depends on the real Claude Code.