Skip to content

fix(ui): slow a task row's running ring and center its time - #5718

Merged
Astro-Han merged 4 commits into
apache:mainfrom
Astro-Han:fix/ui-task-row-motion
Sep 25, 2026
Merged

Astro-Han merged 4 commits into
apache:mainfrom
Astro-Han:fix/ui-task-row-motion

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two adjustments to the sidebar task row's trailing signal slot, which since #5686 holds the running ring and otherwise the relative time:

  • The ring turns slower. The astryx Spinner reads 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-indicator now sets the token to 1.3s. Same role, one speed: the goal chip and tool-activity rows use the same RunningIndicator and follow it. Transient loading spinners elsewhere are untouched.
  • The timestamp shares the trailing column's axis. The slot centered the indicators but right-aligned the time, so a timestamp's midline sat ~8px left of the line the ring, the dot and the hover ⋯ share. The column is now fixed at 44px (the widest scan token, 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 becomes now — just now is wider than every token the column is sized for; the general relative-time format keeps the spelled-out form.
  • The time ink sits on the ring's axis vertically. Blink centers the font's em box, and SF's digit mass hangs ~0.5px below its center, so 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-trim and line-height: 1 were tried first — both are no-ops here because the em box was already centered).

Verification

  • Live geometry probes against Storybook (real DOM + pixel ink measurement): --duration-slow-min computes to 1.3s on the running indicator; the time label's ink centroid moved from 0.50px below to 0.01px below the slot's vertical center.
  • New story play assertions pin the behavior: ConversationStates scans the rule for the slowed token (the ink-ladder contract forbids reading custom properties back via getPropertyValue) and checks the ring and the dot share a center X; LongTitlesAndNarrow reads the ink nudge and checks the timestamp shares the dot's center X. All verified against this branch's storybook-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 lint clean; tsc -p tsconfig.storybook.json --noEmit clean.
  • Not run: full workspace suites beyond the affected checks (CSS + story assertions only); E2E left to CI per repo policy.

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 light
Axis — dark: 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 light
Speed — dark: 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 light
Ink — dark: ink dark

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Maka — diagnosis (live DOM/pixel measurement of the row), the CSS change, the story assertions, and the comparison images.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 25, 2026
@Astro-Han
Astro-Han force-pushed the fix/ui-task-row-motion branch 3 times, most recently from 7085eb1 to fcfd95d Compare September 25, 2026 10:04
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
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
@Astro-Han
Astro-Han force-pushed the fix/ui-task-row-motion branch from 21cdee1 to c755fdb Compare September 25, 2026 13:08

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

@Astro-Han
Astro-Han marked this pull request as ready for review September 25, 2026 13:59
@github-actions github-actions Bot added effort/M Under 500 readable lines and removed effort/S Under 100 readable lines labels Sep 25, 2026

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at c755fdb7551ad3201cfcb454112ec93a327da13a. No P0–P2 findings.

  • Scope: the "now" label comes from formatSidebarTimestamp, whose only caller is the sidebar variant in packages/ui/src/relative-time.tsx. Settings → Tasks uses formatCompactTimestamp and keeps "just now". The diff's hunk header points at formatCompactTimestamp, 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 test is green.

Automated review by an AI agent, approving at a maintainer's request. This is not an independent human review.

@Astro-Han
Astro-Han merged commit cd94498 into apache:main Sep 25, 2026
2 checks passed
Astro-Han added a commit that referenced this pull request Sep 26, 2026
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants