refactor(ui): adopt Astryx disclosures - #1711
Merged
Merged
Conversation
Astro-Han
force-pushed
the
refactor/1565-astryx-disclosures
branch
from
July 31, 2026 16:15
7281ff7 to
74b381b
Compare
jackwener
added a commit
that referenced
this pull request
Jul 31, 2026
These 149 tests read the project's own source and CSS off disk and asserted on its text. They imported nothing under test and ran no code, so they could only ever catch what a linter catches — "don't write a bare 3px", "don't hand-write role=dialog" — while charging every refactor a rewrite of its own guards. #1711 deleted two of them to land an Astryx migration; #1716 had to rewrite six to move three buttons. Deleted: 149 test files (~675 tests) plus one orphaned source helper. Kept: the 219 behavioral tests in the same directory, every e2e spec, and the fast scripts/check-*.mjs commands (dead-css, a11y, copy, console) that cover the same ground in seconds without a build. Also kept, deliberately, seven static guards that protect non-cosmetic invariants rather than styling: the preload/IPC surface pins, the renderer token-leak gate, external-link noopener, and secret redaction. Those are cheap and guard things review reliably misses. The CSS governance doc kept pointing at deleted guards, so its enforcement section now says what actually holds the line: conventions plus the check-* scripts, verified on the rendered surface.
jackwener
added a commit
that referenced
this pull request
Jul 31, 2026
* chore(desktop): drop the source-scanning contract test suite These 149 tests read the project's own source and CSS off disk and asserted on its text. They imported nothing under test and ran no code, so they could only ever catch what a linter catches — "don't write a bare 3px", "don't hand-write role=dialog" — while charging every refactor a rewrite of its own guards. #1711 deleted two of them to land an Astryx migration; #1716 had to rewrite six to move three buttons. Deleted: 149 test files (~675 tests) plus one orphaned source helper. Kept: the 219 behavioral tests in the same directory, every e2e spec, and the fast scripts/check-*.mjs commands (dead-css, a11y, copy, console) that cover the same ground in seconds without a build. Also kept, deliberately, seven static guards that protect non-cosmetic invariants rather than styling: the preload/IPC surface pins, the renderer token-leak gate, external-link noopener, and secret redaction. Those are cheap and guard things review reliably misses. The CSS governance doc kept pointing at deleted guards, so its enforcement section now says what actually holds the line: conventions plus the check-* scripts, verified on the rendered surface. * chore(desktop): drop postcss and unused source helpers with the suite The deleted CSS-parse contract was postcss's only consumer, and the tailwind-compile contract was the only TS importer of tailwindcss — which styles.css still needs through `@import "tailwindcss"`, so it stays declared and is now ignored by knip instead. Nine helper exports lost their last readers with the suite; knip must report zero for apps/desktop.
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.
Summary
Refs #1565 (Slice 8, flat PR A).
Moves every disclosure owned by
chat-turn.tsx,tool-activity.tsx, andtask-ledger-panel.tsxdirectly onto@astryxdesign/coreCollapsible. Maka retains only product state: manual tool expansion survives streaming/status rerenders, permission prompts auto-open, deep thinking starts collapsed and follows live content only while open, error diagnostics remain redacted and bounded, and the task ledger keeps its tree ordering and recent-terminal count.This is one ownership boundary: it migrates all remaining consumers of Maka's shared Collapsible and removes the public/shared primitives that consequently have no real consumers. It does not touch model pickers, composer model controls, General Settings, or their stories/tests/styles.
Deleted surface:
primitives/collapsible.tsximplementation and barrel exportsIntentional capability/appearance changes:
openstate gates heavy disclosure children. Collapsed tool output, processing timelines, deep thinking, and raw error diagnostics no longer build hidden trees; opening mounts them inside the Astryx-owned content region. This also lets live output auto-follow run after visible layout exists.Verification
origin/maincf095e196npm run build— passed (all workspaces plus desktop renderer production build)npm run typecheck— passed after the dependency-ordered build refreshed cross-workspace declarationsnpm run format:check— passednpm run lint— passednpm test -w @maka/core— 1,254 passednpm test -w @maka/ui— 289 passednpm test -w @maka/desktop— 2,691 passednpm run build-storybook -w @maka/desktop— passed;DisclosureInteractioncovers collapsed hit-testing, full-row trigger geometry, Enter expansion, visible content, and label/chevron alignmentnpx playwright test --config e2e/playwright.config.ts e2e/disclosure-output.spec.ts— 1 passed in a real Electron window; verifies Processing and its tool row do not mount collapsed output, expansion follows a static 160-line live stream to within 1px of the tail without a new chunk, and Space collapses/unmounts itMAKA_DISCLOSURE_E2E_SCREENSHOT=/tmp/maka-1565-disclosure-electron.png npx playwright test --config e2e/playwright.config.ts session-workbar.spec.ts— 2 passed earlier in this PR; verifies computed-style and keyboard ownership on the task-ledger journey. One live screenshot was captured locally; no screenshot baseline or generated image is committed.Review focus
role=tree/treeitemwithout focusable items, roving focus/aria-activedescendant, or APG Arrow/Home/End behavior. That existing accessibility gap is intentionally deferred to Slice 9; this PR only changes the surrounding recent-tasks disclosure. See the WAI-ARIA APG Tree View Pattern.<details>and BaseButton disclosures remain untouched for Slice 10.