Repository navigation
fix(ui): slow a task row's running ring and center its time - #5718
Conversation
7085eb1 to
fcfd95d
Compare
The astryx Spinner turns once per --duration-slow-min (525ms stock). A row's running state is not a transient loading cue — it stays on screen for the whole run, so the rail's permanent rings turn at 1.3s instead. The ConversationStates story pins the token on the indicator. Generated-by: Maka
Generated-by: Maka
Blink centers the font's em box and SF's digit mass hangs about 0.5px below its center, so beside the geometrically centered running ring the trailing time read low. translateY(-0.5px) puts the ink centroid on the slot's axis; LongTitlesAndNarrow pins the nudge. Generated-by: Maka
The slot held indicators centered but right-aligned the timestamp, so a time's midline sat ~8px left of the line the ring, the dot and the hover menu share. The column is now fixed at 44px — the widest scan token is "59min" at ~41px — with everything centered on its axis, and the ⋯ takes the same axis so the hover swap does not shift sideways. The en sidebar just-now label becomes "now": "just now" is wider than every scan token the column is sized for, and the spelled-out form stays in the general relative-time format. Titles give the wider column about 20px. Story assertions pin the shared axis for ring vs dot and time vs dot. Generated-by: Maka
21cdee1 to
c755fdb
Compare
jackwener
left a comment
There was a problem hiding this comment.
[kabi-grok-reviewer]
I reviewed c755fdb7551ad3201cfcb454112ec93a327da13a.
Design. Slowing .maka-running-indicator is the right seam. RunningIndicator is used in three places: the session row, the goal chip (session-context-layer.tsx), and linked-agent rows in tool-activity.tsx. All three mean "this run is still going," not a transient load. Other Astryx Spinners do not use that class and keep 525ms. One token for one role.
"just now" → "now" does not leak. Only formatSidebarTimestamp uses SIDEBAR_JUST_NOW. The only production caller is RelativeTime variant="sidebar" in session-history-list.tsx. formatRelativeTimestamp / formatCompactTimestamp still return just now (settings Tasks, artifact pane). zh-CN/zh-TW stay 刚刚 / 剛剛.
P0–P2: none.
Checked this round: rg RunningIndicator (3 call sites); running-indicator.tsx; rg formatSidebarTimestamp|formatCompactTimestamp|formatRelativeTimestamp; relative-time.ts 53–63, 115–184; tests still assert just now on the general format and now on sidebar; git merge-tree --write-tree origin/main c755fdb75 exit 0, tree 8ae637a93.
Not checked: Chromium, fonts other than SF, hover ⋯ geometry, story play in a browser.
简体中文
我审查了 c755fdb7551ad3201cfcb454112ec93a327da13a。转慢的是全部 RunningIndicator(任务行、目标 chip、子代理行),角色一样。now 只走 sidebar 时间格式。没有 P0–P2。
Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.
jackwener
left a comment
There was a problem hiding this comment.
Approving at c755fdb7551ad3201cfcb454112ec93a327da13a. No P0–P2 findings.
- Scope: the "now" label comes from
formatSidebarTimestamp, whose only caller is the sidebar variant inpackages/ui/src/relative-time.tsx. Settings → Tasks usesformatCompactTimestampand keeps "just now". The diff's hunk header points atformatCompactTimestamp, but that function isn't changed. - Slower ring: the 1.3s period applies to every
RunningIndicator: the session row, the goal chip, and tool/subagent rows. That's the same role in each place and matches the description. - Layout: the trailing column is fixed at 44px, and the ⋯
inset-inline-end/ title margin are derived from the same--_trailing-column, so the hover swap stays on one axis. - P3, cosmetic:
translateY(-0.5px)is tuned to SF's digit mass on macOS. With other UI fonts (Segoe UI, Linux defaults) it may over-correct by up to 0.5px. - Not verified: I didn't run a real browser or check non-macOS font rendering. CI
testis green.
Automated review by an AI agent, approving at a maintainer's request. This is not an independent human review.
… 730ms (#5731) #5718 made the task row's trailing signal a fixed 44px centered column, which pushed the ring, dot, timestamp and hover menu 10-20px in from the row's end, took width from titles and forced the en just-now label down to "now". It also slowed the running ring to 1.3s, which at steps(16) drops to ~12 frames a second. Revert #5718 and end-align the signal slot: the ring and the timestamp end on the row's padding edge, and the 8px status dot and the hover ⋯ center on the ring's 14px box so all three share one vertical axis. The running ring takes Astryx core's default 730ms period instead of the Maka theme's 525ms; the goal chip and tool-activity rows share the indicator. The en sidebar label is "just now" again. No migration or compatibility impact. Generated-by: Claude Code
Summary
Two adjustments to the sidebar task row's trailing signal slot, which since #5686 holds the running ring and otherwise the relative time:
Spinnerreads its period from--duration-slow-min(525ms under the Maka theme). A row's running state is not a transient loading cue — it stays on screen for the whole run — so.maka-running-indicatornow sets the token to 1.3s. Same role, one speed: the goal chip and tool-activity rows use the sameRunningIndicatorand follow it. Transient loading spinners elsewhere are untouched.59min, is ~41px) with everything centered on its axis, and the ⋯ takes the same axis so the hover swap no longer shifts sideways. Cost: titles give the wider column ~20px. To keep the column honest, the en sidebar just-now label becomesnow—just nowis wider than every token the column is sized for; the general relative-time format keeps the spelled-out form.5min-style timestamps read low next to the geometrically centered ring.translateY(-0.5px)on the time label moves the ink; the column does not move. Measured on the real render: ink centroid +0.50px → +0.01px relative to the column center (text-box-trimandline-height: 1were tried first — both are no-ops here because the em box was already centered).Verification
--duration-slow-mincomputes to1.3son the running indicator; the time label's ink centroid moved from 0.50px below to 0.01px below the slot's vertical center.ConversationStatesscans the rule for the slowed token (the ink-ladder contract forbids reading custom properties back viagetPropertyValue) and checks the ring and the dot share a center X;LongTitlesAndNarrowreads the ink nudge and checks the timestamp shares the dot's center X. All verified against this branch'sstorybook-static, the same artifact the Storybook smoke runs: ring/dot/⋯ at one center X (222px), time/dot at one center X in the narrow rail.npm run format/npm run lintclean;tsc -p tsconfig.storybook.json --noEmitclean.The axis pair draws one vertical guide through the column's axis (the dot's center): the timestamp's midline sits off it before and on it after — ring, dot, time and the hover ⋯ now share one line:
Axis — light:

Axis — dark:
A still can't show a period directly, so the speed pair freezes each build's ring at the same 400ms of its cycle (stories freeze animation for determinism; the shot restores it, and the duration still reads the live token — 525ms sweeps ¾ of the ring, 1.3s sweeps ¼):
Speed — light:

Speed — dark:
The ink pair shoots the trailing slot at 8x with the slot's midline in red — the timestamp's ink hangs below it before and sits on it after:
Ink — light:

Ink — dark:
AI use
Select exactly one:
Tool(s) and scope: Maka — diagnosis (live DOM/pixel measurement of the row), the CSS change, the story assertions, and the comparison images.
Checklist
Does this PR entail a change in behavior?