Skip to content

docs(design): choice cards v2; feat(git-history): tinted patch lines; fix(desktop): one show more - #1611

Merged
huichen merged 6 commits into
mainfrom
pr/huichen
Nov 14, 2026
Merged

huichen merged 6 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

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

  • docs(design): fix choice-card send, phone selection and queue design
  • feat(git-history): tint a patch line by role, and give the list room to breathe
  • fix(desktop): one "show more" under the recent list, not two

Verification

Local, detached worktree at 9d1a4b7 (Node 22 for mobile):

  • desktop: npx tsc --noEmit clean; npx eslint on the four changed sources clean; npx vitest run src/components/layout/ActivityRail.recent.test.tsx src/features/git-history/GitHistoryPanel.test.tsx -> 43 passed
  • mobile: npx tsc --noEmit clean after npm run gen-version; npx eslint on the two changed sources clean; npx jest --runInBand src/features/chat/__tests__/GitGraphPanel.test.ts -> 16 passed
  • scripts/screenshots/scenarios.d/choice-cards.json parses; the changed screenshot inject scripts pass node --check
  • no Rust crate is touched by this branch, so no cargo pass was run

User-visible changes

  • Git patch views (desktop Git lane and mobile git sheet): each patch line now carries a tinted band plus a solid bar at the left, coloured by line role (added / removed / context), and the tint runs the full row width instead of leaving an untinted gutter; the commit list gains a little space above its first row. Before: the role was shown only through the text colour. Revert a4b88aee9.
  • Desktop activity rail, recent view: one "show more" control instead of two. Its count is the sum of the local stream's and the host catalogues' remainders, and one click advances both cursors; under a filter naming another machine this machine's remainder is not counted. Revert 7e11f34b0.
  • Everything else is design documentation and its screenshots (docs/design/choice-cards.md, choice-cards.zh-CN.md, workspace-thread-archive-and-paging.md, the choice-card images), plus capture-harness scripts under scripts/screenshots/; no runtime behaviour there.

Notes

No migration, no setting default, no wire change.

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.
@huichen
huichen enabled auto-merge (squash) November 14, 2026 17:18
@huichen
huichen merged commit c346e1e into main Nov 14, 2026
12 checks passed
@huichen
huichen deleted the pr/huichen branch November 14, 2026 17:31
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