Repository navigation
feat(bots): shapes by rule editor section - #353
Merged
Merged
Conversation
Fills BotRuleShapesSection: one optional shape per rule in the shared rule order, a popover with the (Default) off option and the shape grid (Default Icon's shape disabled), the lastCalled "after" time, the now badge and the muted status line. Adds the section's copy to every web catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Review (Lukas): approved, merging into Verified on a detached local merge of
Scope. The PR touches only Against spec §9: these hold, checked in the diff and in screenshots F10, F11a and F11b:
Accepted divergences:
Follow-ups:
|
This was referenced Dec 1, 2026
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.
Part of notFrost/sophie#692, phase 4 stage B2 (spec §9).
Problem
While the Default Icon is a built-in shape, Bot settings showed only the "Shapes by rule" label and hint. The editor had no way to pick a shape for a rule.
What changed
Only
BotRuleShapesSection.tsx, its new browser test, and additions to the web translation catalogs.BotIconRuleOrderList(mode="shapes"), using the Bot's shared rule order.SelectButton. It shows a picked rule's shape and name. An unset rule shows the Default Icon's shape plus its name and a muted(Default).Shape for {rule}: {shape}orShape for {rule}: {shape} (Default).side="bottom" align="end" sideOffset={6},width="md"):{Shape} (Default)off option, with a check when it is selected and the noteOff. Follows the Default Icon, even if it changes.h-10tiles. Tiles are silhouettes, except the selected tile and the hovered or focused one, which show the colored shape.aria-disabledatopacity-30, with the tooltipThis is the Default Iconand the note{Shape} is the Default Icon, so it can't be picked here.(D32).lastCalled"after" field. UsesBotIconTimeFieldwithmin={1}and placeholder2h.lastCalledInvalidText(R1). The field getsaria-invalid, plus the messageUse at least 1m, in minutes, hours or days, like 15m, 16h or 2d.linked througharia-describedby.BotIconNowBadgewithout an elapsed time, inrenderHeaderAdornment, on the rule that holds the slot.BotIconSlotStatusin the label row. It showsMuted: only the Default Icon showswhile muted, with no rule badge.rulesdraft.New i18n keys (additions only, inserted by hand after the shapes hint, in all 11 web catalogs)
eebef010adbc973b667102796b9cb153$context: Show a rule's shape after a quiet time)d9569ad01a3a82c9d4f80bc1416d0b6c59327334954ea9e7f71feb43bdf6da5b5e9ea2f11ff8534b83dc324158b33dda8d9153ba3b589c1011693a115a1c5637How tested
BotRuleShapesSection.browser.test.tsxhas 7 tests:(Default)and aria-labels;afterdisabled while unset, then enabled with 2h after the first pick;0mrejected with the message, the text kept in the draft, and recovery;The pre-commit hook passed fmt, lint and knip.
vp run check:changedfails on Windows before it reaches the checks: it switches to run everything, then hitsspawn ENAMETOOLONGinscripts/check-changed.ts:555. That is a tooling limit, not this diff.Screenshots
Taken from an isolated dev server (
vp run dev --no-seed, worktree.t3/userdata) with a test Bot, in the light theme. They are not committed; the files are inD:\Projects\Sophie\.sophie\t3\bots\_shared\692-timeline-icons\b2-screens\:F10-shapes-by-rule-now-badge.png: Cloud, Star and Clover after 1m, saved, with the now badge on Since last activity.F11a-popover.png: popover open on Left for you, off option selected, Star hovered with its tooltip, Squircle disabled with its note.F11b-unset-after-disabled.png: all rules unset, with theafterfield disabled at 2h.F11b-rejected-0m.png:0mrejected, with the message and the footerFix the shapes by rule to save.F12-display-quiet-clover.png: sidebar, breadcrumb and details avatars showing Clover while the Bot is quiet.Left out / divergences
BotAvataronly sets the face throughstatus, which also draws the status dot, andBotFaceisn't exported. For now every avatar in the section uses the calm face. The proposed fix is an optionalexpressionprop onBotAvatar; this is waiting on the lead.w-50), not the spec's 172px minimum. At 172px,Squircle (Default)is truncated.renderBody, aligned to the title column, because the shared list owns the row description. Visually it is under the description.🤖 Generated with Claude Code