Repository navigation
docs(design): choice cards v2; feat(git-history): tinted patch lines; fix(desktop): one show more - #1611
Merged
Conversation
The recent view interleaves this machine's stream with every paired host's
catalogue window, and each keeps its own tail behind its own cursor. So two
controls with the same sentence sat under one list — reported as "why two, one
213 and one 702?" — and neither said which rows it continued: the accent button
was the local stream's remainder, the plain row below it was a host's.
The list is one list, so it now draws one control. Its count is the sum of both
remainders and one click walks both cursors, which keeps the contract the count
already made ("a control that says N loads N"). Each half is counted only where
its rows are listed: under a filter naming another machine this machine's tail
is not behind this list, so the sum leaves it out and the click does not fetch
it.
The tree view is unchanged: there the two halves are two visibly separate
sections, and each one's load-more sits under its own rows.
Tests: a case for the summed count and the double load, and one for a host-only
remainder (the local click must not fire). The design note's §4.4 says the same.
…to breathe A patch indexed its roles by text colour alone, which is hard to scan at 11px monospaced: an addition and a removal differed by a hue on small type. Each line now carries a tinted band and a solid bar at the left, from the same success/danger/info tokens the rest of the app uses, and the bar is kept transparent on context lines so the columns stay aligned. The tint belongs to the line rather than to the card: the container drops its padding and every line pads itself, so the colour runs the full width instead of leaving an untinted gutter down both edges. Both screens read a patch, so both changed the same way. The commit list also gains a little space above its first row, which was butting against the surface above it.
Three defects the reader found in the v1 design, each located in the code
before anything was changed:
1. Send stayed disabled after picking, so "pick and send" (requirement d)
did not work. v1 put the answer chip in the attachments row, which is
neither editor content nor the `attachments` array, so
`disabled={(inputEmpty && attachmentCount === 0) …}`
(ComposerControls.tsx:426) never cleared. v2 makes the answer an atomic
pill inside the contenteditable — `isEditorEmpty` counts any
`[data-mention]` as content (mentionDom.ts:6-12), and `serialize()`
emits `[title → label]` in document order, so (a)(c)(d) hold with no
change to the send test. Measured on the real editor: empty → disabled,
pill only → enabled, pill removed → disabled.
2. The phone's chosen row marked selection three ways at once (fill,
accent border, white check on a solid blue disc), reading as "done"
rather than "selected". v2 keeps one row-level cue (accent-soft, no
border) and uses a ring-with-dot; the chip drops its second blue and
the pencil and × share one ink.
3. A chosen answer flattened to plain text once it joined the send queue,
so the choice could not be changed — `queueDraft()` hands
`editor.getContent()` to the panel and `SendQueuePanelItem.content` is a
string. v2 adds an optional `choice` to the queue row (following the
`attachments?` precedent) and renders a changeable chip in the row.
Also documents the measured remote and mobile send tests
(`(!text.trim() && uploads.length === 0)`, `!!message.trim() || attachments.length > 0`),
which is where those two surfaces must count the answer.
Screenshots are re-captured from the real UI (12 images; two new ones for
"chosen + typed" and "in the queue"), and every scenario asserts rather
than merely capturing — a failed assertion reports `n/m captured` instead
of handing back a picture that looks fine.
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.
The choice-card design gets a v2 pass (send control, phone selection, queue row) with refreshed screenshots, and the Git history patch view on desktop and mobile now tints each patch line by role. The desktop activity rail's recent list draws one "show more" instead of two.
Commits
Verification
Local, detached worktree at 9d1a4b7 (Node 22 for mobile):
npx tsc --noEmitclean;npx eslinton the four changed sources clean;npx vitest run src/components/layout/ActivityRail.recent.test.tsx src/features/git-history/GitHistoryPanel.test.tsx-> 43 passednpx tsc --noEmitclean afternpm run gen-version;npx eslinton the two changed sources clean;npx jest --runInBand src/features/chat/__tests__/GitGraphPanel.test.ts-> 16 passedscripts/screenshots/scenarios.d/choice-cards.jsonparses; the changed screenshot inject scripts passnode --checkUser-visible changes
a4b88aee9.7e11f34b0.docs/design/choice-cards.md,choice-cards.zh-CN.md,workspace-thread-archive-and-paging.md, the choice-card images), plus capture-harness scripts underscripts/screenshots/; no runtime behaviour there.Notes
No migration, no setting default, no wire change.