Repository navigation
fix(app-shell): Studio publish with nothing to publish is an outline that says why; measure canvas width and nav accessible name (objectui#8219) - #10679
Conversation
…he nav item accessible name (objectui#8219) The no-draft publish pin is RED against this tree: the disabled button still carries the primary style and its reason lives only in `title`. The enabled publish pin and both nav accessible-name pins confirm existing behaviour. Co-Authored-By: Claude <noreply@anthropic.com>
…e button that says why (objectui#8219) With no pending draft the header Publish button stayed the primary button, dimmed only by `disabled:opacity-50`, and its reason lived in `title` alone. It now drops to an outline, and the existing `engine.studio.publishNoneTitle` string shows as visible text beside it, linked as the button's description. The has-draft state keeps the primary style; both states carry a border so the swap does not shift the bar. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ 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
|
✅ ACCEPTED — PR objectui#10679 at
|
|
Part of #8219
This PR delivers item 2 (the publish button). It measures items 1 and 4 on a live render and records them; neither reproduced as the card describes, so nothing changes there. Item 3 (the AI panel's discussing line) is left open, and the card stays open: that line is rendered outside the claimed file (see "Item 3" below). The breadcrumb and canvas-caption tooltips are untouched, per the objectui#7254 ruling.
How it was measured (live render)
The card's numbers came from a stack that had already exited, so every number below was re-measured in a real browser. This PR adds no backend: a dev-only Vite page in
apps/console(uncommitted, deleted after the run) mounted the realStudioDesignSurfacefrom workspacesrc. Tailwind is real, and a fetch stub answered/api/v1/*. The app nav was one labelled dashboard leaf (客户仪表盘) plus one unlabelled object leaf (b2r4_customer). The dashboard had one bar widget with three bars. Chromium came from/opt/pw-browsers/chromium.Item 1: canvas width (measured, not reproduced as "frames eat 55%"; no change)
Rendered width of each box, preview column to chart, at viewport 800 (main column 592, close to the card's 596):
main(p-4)rounded-lg border bg-background p-4, this file)PreviewShellframe (border)PreviewShellbody, then thep-3scroller (DashboardPreview)min-w-[768px]grid (DashboardPreview)p-6)At viewport 1512 with the inspector open, the same chain reads 1016, 984, 950, 948, 924 (grid), 454 (widget), 404 (chart).
The chain reproduces the card's numbers almost exactly (596, 564, 530, 528, 376, 326), but the card attributes the loss wrongly:
maindown to the grid cost 92 px of 592 (about 16 %);DashboardPreviewpins tomin-w-[768px]: at narrow widths the grid is wider than the visible scroller, and the lone widget still takes half of it;The claim's rule was to act only if most of the width goes to nested frames. It does not, so this PR changes nothing for item 1. The levers that would matter are the full width and content height for a lone widget, and the
min-w-[768px]pin. They live inpackages/app-shell/src/views/metadata-admin/previews/DashboardPreview.tsxand theplugin-dashboardgrid, both outside this claim's file surface. The report hands them back to the seat as a fork.Item 2: the publish button (fixed)
Before: with no draft, the button is disabled but keeps
bg-primary text-primary-foreground disabled:opacity-50, and its reason sits intitleonly. After:border text-muted-foreground). The existingengine.studio.publishNoneTitlestring (「没有待发布的草稿」) shows as visible text beside it, andaria-describedbypoints at that text. No new i18n key.Item 3: the AI panel's 「正在讨论:…」 line (not changed; outside the claimed file)
The line is built in
packages/app-shell/src/console/ai/AiChatPage.tsx, where thesurfaceContextLabelprop's target istype · name. It is rendered bypackages/plugin-chatbot/src/ChatbotEnhanced.tsx, which has notitleslot for the chip. The surface context carries only{ type, name }, taken from the URL, so it has no label to show. Neither file is in this claim's file surface, so the dev stopped on this item, as the claim requires. Options are in the report.Item 4: the nav item's accessible name (measured; already reads the label; pinned, no change)
Measured from the live Chromium accessibility tree (CDP
Accessibility.getFullAXTree):dashboard · customer_dashboard(fromtitle);object · b2r4_customer.In neither case is the name the
type · namemachine id. The id is only the description, which is what the card asks for.getByRole('button', { name })in jsdom gives the same result. Both pins confirm existing behaviour.Red, then green
Tests 1 failed | 3 passed (4). The failure is the no-draft pin:expected 'inline-flex items-center gap-1.5 roun…' not to match /\bbg-primary\b/. The enabled-publish pin and both accessible-name pins pass, because they confirm existing behaviour.StudioDesignSurface.surfaceIdentity.test.tsx(unmodified):Test Files 2 passed (2) · Tests 8 passed (8).Gates (local, at head
d5103666daunless stated)vitest run --maxWorkers=2 packages/app-shell/src/views/studio-design/ packages/app-shell/src/views/metadata-admin/:Test Files 371 passed (371) · Tests 3881 passed | 1 skipped. This ran atda06d7bbce; the later commit adds only the changeset. The full app-shell package was not run locally, because this run alone took 598 s under the shared lock, against the foreground cap of about 10 minutes. CI runs the full package.turbo run build --filter='@object-ui/app-shell^...': 28/28 tasks OK.pnpm --filter @object-ui/app-shell type-check: exit 0. It runstsc --noEmitandtsc -p tsconfig.test.json, and--listFilesOnlyshows the new test file is in the second project.origin/main's copy ofStudioDesignSurface.tsxreads the same 0 errors and 18 warnings, and none are in the changed hunks. This is a narrowed lint run: the files come from the diff, the count from eslint's--format json, andeslint.config.jsenables no type-aware parser options, so the diff cannot change the verdict for any untouched file. The repo-widepnpm lintis left to CI.check:changeset-claimsexit 0. Its one finding (a pending changeset about eager chunks that names this file) still holds, since no import changed.check:pending-changeset-literalsexit 0.check:new-line-citations: 0 new citations.check:control-bytesOK.check:i18n-keysexit 0 (no keys changed).node scripts/check-changeset-presence.mjs: one changeset declared.packages/i18n/src/__tests__/machineLocaleCensus-9909.test.ts: passed (in a run of 3 files and 15 tests).Screenshots
These were taken in the live harness and are not committed. They are listed in the report.
Generated by Claude Code