Repository navigation
fix(app-shell): the pending-drafts bar's sentence wraps on a phone instead of being cut (objectui#13088) - #13101
Merged
objectstack-fleet[bot] merged 3 commits intoOct 20, 2026
Conversation
…stead of being cut The bar drew its sentence in a `truncate` span, so on a phone the row was narrower than the sentence and its second half (users cannot see the change yet) was cut with an ellipsis. The span now takes the row's free width and wraps (`min-w-0 flex-1`); the publish button stays `shrink-0` on the bar. The span gains a `data-testid` so a structural test can find it without reading the classes it asserts about. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014MXhk1yjWh37d634hLy3p7
…s sentence, before and after Throwaway: the next commit deletes this directory, so the pull request's diff never carries it. Kept reachable through this commit's SHA. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014MXhk1yjWh37d634hLy3p7
The readings stay reachable through the previous commit's SHA. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014MXhk1yjWh37d634hLy3p7
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contributor
Author
席位核对 · ACCEPT · objectui#13088 · PR #13101 ·
|
objectstack-fleet
Bot
deleted the
claude/issue-13088-drafts-bar-sentence-wraps
branch
October 20, 2026 00:46
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.
Fixes #13088
Clause-②: no
What changed
PendingDraftsBardrew its sentence in amin-w-0 truncatespan: one line,overflow: hidden, an ellipsis. On a phone the bar's row is narrower than the sentence, so the half that says users cannot see the change was cut (zh at 390 px ended 「用户还看不…」).The span is now
min-w-0 flex-1: it takes the row's free width and wraps. The publish button keepsshrink-0, so it keeps its width on the bar. The span gainsdata-testid="pending-drafts-bar-sentence"so the structural test finds it without reading the classes it asserts about. The bar's own row classes are unchanged (items-centerkept, see H5 below).Only
packages/app-shell/src/console/ai/PendingDraftsBar.tsxchanges in source (one class string, one attribute, one comment). No prop, export or published face moves: the diff neither widens nor narrows any export or prop (Clause-②: no, as the claim declared). The i18n keyconsole.ai.pendingDrafts.countand its values are untouched. The bar's mount inAiChatPage.tsx, the preview pill andpackages/plugin-chatbot/**are untouched.Measured boxes (Acceptance 1)
Chromium headless, the rig of PR #13067 / PR #13085 reused: the worktree's console Vite dev server serving the REAL full-page
AiChatPage(or the REALChatDockMobileSheet/ChatDockPanel), withfetchstubbed in the page (onebuildagent, two turns plus anapply_blueprintresult, one draft in the ledger). One addition to the harness: alang=zh|enswitch on theI18nProvider. "Before" ismaincd4623das checked out (nothing edited); "after" isd45156b. Boxes are left top right bottom, CSS px. Viewports: 390 by 844, 320 by 700, 1010 by 800, 1280 by 900.Control:
before-fullpage-390-zhreads the card's numbers exactly: sentencescrollWidth248 againstclientWidth240, bar 16 650 374 704; at 320 px, 248 against 170.Phone widths, full-page chat:
Other hosts and the desktop control:
With the phone preview pill showing above the bar (objectui#13068's column): zh 390 pill 144 606 246 642 before, 144 602 246 638 after; en 320 pill 97 454 223 490 before, 97 430 223 466 after; pill on bar 0 in all four, bar and textarea as in the first table.
At desktop widths the span's
scrollWidthgrows only becauseflex-1now lets it fill the row; the text stays on one line and the bar, button and textarea boxes are identical before and after. In every reading the button sits inside the bar and on screen, a tap at its centre reaches it, and the page has no horizontal scroll (scrollWidthequals the viewport width).Bar crops, before and after (zh 390, zh 320, en 390, en 320):
Full page, zh 390, after:
Where the evidence lives: commit
4d0b7e0of this branch, directoryevidence/13088/: every reading as JSON (before and after), the bar crops and full-page screenshots above plus the desktop-dock en crops, a README, the throwaway harness page and the Playwright driver. The next commit,5dc6838, deletes the directory, so this pull request's diff does not carry it (git rev-parse d45156b^{tree} 5dc6838^{tree}prints the same tree twice). No other branch was created.The PM's hypotheses, measured
truncate(computedwhite-space: nowrap,text-overflow: ellipsisbefore;normal/clipafter). With the clamp gone the sentence is whole at 390 and 320 px in zh and en, on two lines (three for en at 320), and the button stays on the bar.break-words; nobreak-allwas added. At zh 390 the second line holds 「到。」 alone.text-prettywas tried and measured: the same boxes, it moved one character at 390 and split 「用户」 at 320, so it was not kept.data-testid, and goes red with the clamp restored (below).AiChatPage.draftsBarInFlow-12978.test.tsxandAiChatPage.previewPillInFlow-13068.test.tsxare untouched and green.items-centerkept. The button is centred against the wrapped sentence (11 px above and below it in the 58 px zh 390 bar, 21 and 21 in the 78 px en 320 bar), fully inside the bar, on screen, and reachable by a tap at its centre.items-startwould pin it to the first line and leave an empty band under it beside a three-line sentence, so the row's alignment does not change.Tests (Acceptance 2)
packages/app-shell/src/console/ai/__tests__/PendingDraftsBar.sentenceWraps-13088.test.tsx(new). The realPendingDraftsBarwith one pending draft. happy-dom runs no layout and loads no stylesheet, so it reads the structure that decides whether the sentence can wrap: the sentence element (bydata-testid) holds the whole sentence and carries no one-line clamp (truncate,whitespace-nowrap,text-nowrap,text-ellipsis,overflow-hidden,overflow-x-hidden,overflow-clip,line-clamp-*); nothing from it up to the bar hands itwhite-space: nowrapby inheritance (truncate,whitespace-nowrap,text-nowrap); the publish button is on the same bar.min-w-0 truncatewith itsdata-testidkept (ablation-replace.mjs, anchor 1 to 0 on disk, blobf409ec4tob843724). The new test went red,Tests 1 failed (1), onexpected [ 'truncate' ] to deeply equal []. Restored: blob equals HEAD (f409ec4) andgit diff HEADempty. Reverting the whole file tomainalso turns it red, but on the missing handle, which is why the class-only leg is the one recorded.whitespace-nowrapadded to the bar's row, the sentence untouched. Red,Tests 1 failed (1), onexpected [ 'div whitespace-nowrap' ] to deeply equal [], the inherited-clamp reading. Restored and proved the same way.pnpm exec vitest runon the new test plusPendingDraftsBar.test.tsx:Test Files 2 passed (2),Tests 3 passed (3).@object-ui/app-shellsuite on head5dc6838(pnpm --filter @object-ui/app-shell test, which isvitest run --root ../.. packages/app-shell/):Test Files 1613 passed | 1 skipped (1614),Tests 15041 passed | 9 skipped (15050), exit 0. It includesAiChatPage.draftsBarInFlow-12978.test.tsx,AiChatPage.previewPillInFlow-13068.test.tsxandPendingDraftsBar.advisoryReachesAuthor.test.tsx, all untouched.Gates (local subset; the farm is CI's)
Each exit code was captured to a file before any pipe, on head
5dc6838(treeeeb2438, the same tree asd45156b).pnpm --filter @object-ui/app-shell lint: exit 0 (0 errors, warnings only; none in the changed files).pnpm --filter @object-ui/app-shell type-check: exit 0, after building the package's dependency closure (turbo run build --filter='@object-ui/app-shell^...', 28 tasks successful).tsconfig.test.jsonincludessrc/**/*.test.tsx, so the new test is compiled.pnpm --filter @object-ui/app-shell test: exit 0 (Test Files 1613 passed | 1 skipped (1614)); about 60 minutes on the shared four-core box, under the shared verify lock.pnpm check:new-line-citations0 (0 new citation(s)),pnpm check:control-bytes0,pnpm check:vi-mock-specifiers0,pnpm check:vi-mock-inherit0,pnpm check:vi-mock-override-shape0,pnpm check:test-path-roots0,pnpm check:unreferenced-sources0,pnpm check:changeset-claims0,pnpm check:pending-changeset-literals0,node scripts/check-changeset-presence.mjs0 (2 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)),node scripts/check-changeset-no-major.mjs0..changeset/13088-drafts-bar-sentence-wraps.md,@object-ui/app-shellpatch.Acceptance notes
truncatecut the sentence; it is covered by this change, not a separate defect.Generated by Claude Code