Repository navigation
fix(ui): in a narrow record drawer a relative time stays on one line - #34732
Conversation
Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
The meta line's "· time" and the activity entries' time are one unbreakable piece, and their rows wrap between pieces, so in a narrow drawer the time moves to the next line instead of breaking per word. Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
…o a render is stable for the same record Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
…-34614-narrow-badge-time Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
Measured in Chromium with the classes read out of the sources: the meta line's time unit and the activity entry's time stay on one line at 380 and 400px, a 900px control keeps each on one line, and a key-field badge shows whole or ends in an ellipsis with its label as the title. Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
…rrow-badge-time Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB 席位核对 · L1 (seat 3, L1-a) · 2026-11-17T09:19ZL1: ACCEPT The time half of the card is built in all four places where the time broke, inside the amended surface. The badge half was measured, found not to reproduce, and is pinned by an e2e control instead of a code change. The one-letter cut the dev did find has its own card (#34696, Must-fixNone. Should-fixNone. Readings that hold
Notes
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzg2evNa1V3zxrQq3KX Landing · 2026-11-17T09:20Z · area o3-A
State: |
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufzg2evNa1V3zxrQq3KX
Fixes #34614
Clause-②: no
Metadata-protocol: none
Refs #34696: the card's "badge cut to one letter" symptom moved there. Measured, it is
record:path's desktop stage row in a narrow drawer. That card is in development by another dev in this area and touchesrecord-path.tsxonly.维护者速读
record:path)的桌面行,已转到 窄记录抽屉:阶段路径按视口而不是容器切换,桌面行在 380px 抽屉里把阶段名截成一个字母 #34696。ui/packages/plugin-detail/src/RecordMetaFooter.tsx(MetaEntry的data-record-meta-when一段)、ui/packages/plugin-detail/src/RecordActivityTimeline.tsx(条目头data-feed-when和系统行data-stream-when)、ui/e2e/narrow-drawer-time-34614.spec.ts。pnpm --dir ui run test:e2e --project=chromium e2e/narrow-drawer-time-34614.spec.ts,预期 6 passed(380/400px 时间各占一行,900px 对照,徽标完整或带省略号和 title)。What changes
RecordMetaFooter.tsx,MetaEntry). The dot and thetimeelement now sit inside oneinline-flex … whitespace-nowrapunit (data-record-meta-when), and the entry becomesflex-wrap(data-record-meta-entry). In a narrow drawer the entry wraps between label, user and that unit, so "· 2d ago" moves to the next line whole. Before, the time was a shrinkable item of a row that could not wrap, so it broke word by word. An entry without an actor carries the unit without a dot.RecordActivityTimeline.tsx). The entry header and the folded-run header becomeflex flex-wrap items-center gap-x-2 gap-y-0.5, and their time span iswhitespace-nowrap(data-feed-when). On the stream face, the compact system line keeps "· time" as one nowrap unit (data-stream-when) after a separate break space, so its text reads byte-for-byte as before.ThreadedReplies.tsx). The reply header gets the same treatment as the entry it replies to.Badges: nothing to change (the card's item 2 was falsified by measurement). The select / status / multiselect badge already truncates inside itself:
SelectCellRenderer'sBadgeismax-w-full min-w-0around an innertruncatespan, with the label as itstitle. In a 380px drawer, on the real record page in Chromium (default page and a hand-written page), 「方案报价」-length labels were whole, and long labels ended in an ellipsis with the title. No badge was cut silently at 375 / 380 / 400 / 900px. The new e2e badge control pins this.HeaderHighlight.tsxis not in the diff. The one-letter cut that does happen in a narrow drawer isrecord:path's desktop row, which is viewport-keyed: seven stages read "P… ✓… Pro… Ne…". It moved to #34696.Why
The card measured a 380–400px record drawer. The time lines broke per word there: "2 / days / ago" on the meta line, and "3" over "天前" in an entry header.
Tests
ui/packages/plugin-detail/src/__tests__/narrowDrawerTime-34614.test.tsx(new, 7 cases, class shape: jsdom has no layout). The meta unit is nowrap and holds the dot and the time; the entry is flex-wrap; the no-actor entry has no dot; the entry, folded and reply headers are flex-wrap with a nowrap time; the system line keeps the break space outside its unit, with unchanged text.ui/e2e/narrow-drawer-time-34614.spec.ts(new, 6 cases, Chromium geometry, in the pattern ofrecord-path-phone-row.spec.ts). It reads the real class strings out ofRecordMetaFooter.tsx,RecordActivityTimeline.tsx,HeaderHighlight.tsx(default-page grid cell),ui/badge.tsxand the select badge in@object-ui/fields, and every extraction throws on drift. It compiles real Tailwind for exactly those classes. The cases: at 380 and at 400px, the meta times are one line each and the long entry's time moved down whole; at 380 and at 400px, the entry time is one line and moved to a line of its own; a 900px control keeps both on one line; a badge control shows 「方案报价」 whole and a long label ellipsised, with its title and inside its cell.Ablations (each fix committed first, mutated through
scripts/ablation-replace.mjs, restored to the HEAD blob with an emptygit diff HEAD):whitespace-nowrapdropped from the meta unit → caught by the jsdom pin, NOT by the e2e spec.narrowDrawerTime-34614.test.tsxwent 2 failed / 5 passed ("draws the dot and the time inside one unbreakable unit", and the no-actor control). The e2e spec stayed green (6 passed): the unit (about 70px) is a flex item of the nowflex-wrapentry, so it moves to a fresh line whole either way.nowraponly matters when the unit alone is wider than a line.flex-wrapdropped from the meta entry → the e2e spec goes red: 2 failed / 4 passed, both meta cases (380, 400), "Expected: at least 51.5, Received: 28". The time stayed on its label's row.flex-wrapdropped from the activity entry header → the e2e spec goes red: 2 failed / 4 passed, both entry cases (380, 400).Acceptance notes
ui/e2e/spec and namesRecordActivityTimeline.tsxandThreadedReplies.tsx.RecordComments.tsx's header (a legacyDetailViewsurface) has its time in a non-wrapping flex row.ActivityTimeline.tsxputs its time on its own line, andHistoryTimeline's header is alreadyflex-wrap, so neither breaks per word.AGENTS.md✨ Set up Copilot instructions #2 asks for README /content/docs/frontend/updates. No page there describes the meta line or the timeline header layout, so none was edited.Verification
All on head
acf4cd7347(origin/main77b42a1ed0merged) unless noted. Logs are folded.Package tests and type check (plugin-detail)
Chromium geometry spec and the e2e type check
Locally a static stub answered
:4173/console/for the config'sreuseExistingServer, because the spec usespage.setContentand never loads the Console. CI serves the built Console as usual.Reproduction readings (one-off, not committed)
The real components' DOM was laid out in Chromium with real Tailwind, plus the real
RecordDetailViewmounted with a stub data source in a 380px drawer.Derived gate families (dispatch-gates --commands, 38 families, on acf4cd7)
Every command in the derived list exited 0 on the final head, including the changeset gates,
check:nul-bytes,check:cross-package-test-inputs,check:test-source-alias,check:published-files,check:type-check-coverage,check:type-check-debt, andpnpm --dir ui exec vitest run scripts/(Test Files 171 passed | 2 skipped,Tests 5077 passed | 2 skipped). Reconciliation:Run reconciliation — 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN.ui
check:new-line-citations:0 new citation(s). eslint on the touched files: 0 errors (5 pre-existingno-explicit-anywarnings inRecordMetaFooter.tsx).overlap-check:VERDICT clean exit 0. Full lint farm: CI.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (eslint on the touched files: 0 errors; full lint farm: CI)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX