Uh oh!
There was an error while loading. Please reload this page.
fix(e2e): align Astryx-migrated selectors in four specs - #1752
Merged
Conversation
#1728 moved the conversation surface onto Astryx primitives but left four E2E specs pointing at the removed DOM: - permission-mode-surface: the permission picker moved from the footer's .maka-composer-left-controls to the Astryx header context (.maka-composer-header-context); the Selector trigger is still a combobox, so only the container selector changed. - scroll-geometry / session-health-notice: the composer card anchor .maka-composer-inner is gone; .maka-composer-astryx now carries the centered measure (width: min(var(--maka-chat-measure), 100%)). - disclosure-output: live tools now render through Astryx ChatToolCalls; a single running tool is one collapsed CallRow (role=button) whose detail mounts on demand, replacing the [data-processing=block] wrapper and its fixture readiness selector. Two assertions also tracked deliberate Astryx changes: the turn gap is 16px (ChatMessageList density=compact gap=4) instead of 12px, and a fully pinned scroller can read a 1px distance because Chromium keeps sub-pixel scrollTop values (observed 30106.5), so the pin contract accepts <= 1px. Full suite: 93 passed.
Uh oh!
There was an error while loading. Please reload this page.
Astro-Han added a commit
that referenced
this pull request
Aug 1, 2026
`titlebar restores the official SideNav width after pointer collapse` has failed on every CI run since #1750 upgraded Astryx to 0.2.0. It was green when introduced in #1751 and appeared in the failure list for the first time in the #1750 run; #1752 fixed the other Astryx-migration failures but not this one. Cause: the resize handle no longer responds to synthesised pointer input. Measured — after `mouse.down()` on the handle and a drag across the panel, `aria-valuenow` and the rendered width both stay at 260, and a hand-built `PointerEvent` sequence with the right `pointerId`, `buttons`, and `isPrimary`, dispatched to both the handle and `window`, moves neither. Keyboard resize still works, so this is specific to pointer drag. The test went on asserting `collapsed` after a drag that collapsed nothing. Collapse through the titlebar control instead: same round trip, by the path a user has, and drivable. Strengthened while here — it now picks a non-default width first, so restoring proves the chosen width came back rather than the 260px default. The `app-shell.tsx` guard that refuses to persist a sub-minimum width is left explicitly uncovered and documented as such: only pointer drag produces an under-minimum width, and there is no renderer-side seam for it today. Better named as a gap than papered over by a test that cannot reach it.
This was referenced Aug 1, 2026
Astro-Han added a commit
that referenced
this pull request
Aug 1, 2026
Astryx 0.2.0 ResizeHandle hitAreaOffsetX applies translateY(-50%) without top:50%, so only the top half of the handle receives pointer events. A center drag (where the pill sits, and where e2e aims) hits the handle root with no pointerdown and never collapses — the sole remaining main e2e failure after #1752. Neutralize the transform on the official SideNav handle; remove once Astryx fixes hitAreaOffsetX.
Astro-Han added a commit
that referenced
this pull request
Aug 1, 2026
… the long-failing sidebar spec (#1756) * test(e2e): move Electron teardown coverage to node --test closeElectronApplication drives a fake process handle and never launches Electron, so it was the one spec in the Playwright suite paying a real Electron slot for assertions that need none. It tests the launch harness itself, not product behavior. Move both cases to scripts/electron-lifecycle.test.mjs, beside the sibling harness tests (fixture-env, fixture-window), and register them in test:scripts. No coverage changes. * test(e2e): drop the retired screenshot capture paths MAKA_MCP_E2E_SCREENSHOT and MAKA_DISCLOSURE_E2E_SCREENSHOT are set by nothing in the repo — no script, no workflow, no docs — so both branches were dead in every run. AGENTS.md already records that the screenshot capture harness was retired because its baselines rot and never ran in CI. The mcp block cost more than dead code: capturing variants meant flipping to dark theme and resizing to 760px mid-journey, so a spec about add / discover / disable / import / delete also carried theme and viewport churn unrelated to any of it. The session-workbar half is folded into the following commit, which rewrites the surrounding disclosure assertions. * test(e2e): assert disclosure and locale behavior instead of design tokens These assertions pinned numbers, not outcomes: they go red when Astryx retunes a size, and stay green through anything a user would notice. - session-workbar: the collapsed Collapsible was measured for trigger vs root width and label/chevron centering — upstream component internals. What the journey is about is that a collapsed section hides its rows and Enter reveals them, which reads directly off the row. Drops the dead screenshot branch in the same rewrite. - sidebar-navigation: a 13px font-size pair, and a whole test whose only assertion was menu width < 128. The heading test keeps its real contract (one 会话 heading, no redundant group label). - scroll-geometry: turn separation must equal exactly 16px. - bot-onboarding: a 284px QR frame and a 522px dialog cap. Replaced by the contract that matters for scanning a code — the dialog stays inside the window and the QR is in the viewport. - locale-renderer: screenshot.byteLength > 10_000 cannot disagree with the implementation; a blank frame clears it too. The rendered translated control is the evidence, and it was already being asserted. * test(e2e): consolidate window-floor sweeps and step the provider journey Five settings tests each launched their own Electron window to do the same thing: shrink to the 480px floor and walk pages. They now share one window and one sweep, split into named steps. Every page-specific assertion is carried over unchanged — health tiles, usage tabs, the web-search hint, memory's preview header and status Item, palette wrapping, the data strategy field and workspace path, about, daily review. The three wide track-count checks collapse the same way. Pages needing their own seeded fixture (permissions, usage logs, search results) stay separate: their state is what makes the contract reachable. The provider add journey ran ~150 lines and ten behaviors under one name, so any failure meant reading all of it to learn what broke. Splitting it into separate tests would buy isolation at four more cold starts; test.step gives the trace the same answer for free. Also drops two more token assertions found in that journey (dialog width cap, 24px brand plate) and the settings switch's 40x24 geometry test. Net: 20 settings tests to 14, and the E2E suite from 94 to 86. * test(e2e): record the suite's new size in the config note * test(e2e): restore the QR rendering contract dropped in the token sweep The token sweep replaced the QR geometry block with `toBeInViewport()`, which was too weak for what the comment claimed. Playwright's default `ratio: 0` passes on any positive intersection, so a QR with one corner on screen — or one shrunk to a dot inside its frame — cleared the assertion while being unscannable. The 284px frame and 522px dialog cap really were tokens. But `qrBox.width === qrFrameBox.width - 2` was not: it is the relationship "the image fills its frame", and nothing else in the suite covers rendered QR geometry. Restored as relationships rather than constants: fills its frame, square, at least 160px, centred in its dialog, wholly in the viewport via `ratio: 1`. Both halves proved by negative control — shrinking the QR to 1px and shifting it so only a corner shows each turn the test red. * test(e2e): stop recording a test count that rots The note said 94 tests; it had been stale for a while, and my own edit made it worse by writing 86 from a passed-count that excluded a failing test. Actual discovery is 87 on this branch and 98 on main. A number that has now been wrong twice, in the same comment, is not worth maintaining: `playwright test --list` is authoritative and free. Keeps the timing measurement, which is what the note exists for. * fix(e2e): drive sidebar collapse through a path that still works `titlebar restores the official SideNav width after pointer collapse` has failed on every CI run since #1750 upgraded Astryx to 0.2.0. It was green when introduced in #1751 and appeared in the failure list for the first time in the #1750 run; #1752 fixed the other Astryx-migration failures but not this one. Cause: the resize handle no longer responds to synthesised pointer input. Measured — after `mouse.down()` on the handle and a drag across the panel, `aria-valuenow` and the rendered width both stay at 260, and a hand-built `PointerEvent` sequence with the right `pointerId`, `buttons`, and `isPrimary`, dispatched to both the handle and `window`, moves neither. Keyboard resize still works, so this is specific to pointer drag. The test went on asserting `collapsed` after a drag that collapsed nothing. Collapse through the titlebar control instead: same round trip, by the path a user has, and drivable. Strengthened while here — it now picks a non-default width first, so restoring proves the chosen width came back rather than the 260px default. The `app-shell.tsx` guard that refuses to persist a sub-minimum width is left explicitly uncovered and documented as such: only pointer drag produces an under-minimum width, and there is no renderer-side seam for it today. Better named as a gap than papered over by a test that cannot reach it.
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 freeto 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
#1728moved the conversation surface onto Astryx primitives but left four E2E specs pointing at removed DOM, failing the CI e2e job with the same 8 tests across runs (scroll-geometry ×4, permission-mode-surface ×2, disclosure-output, session-health-notice). The product contracts those tests lock are all still live; only the selectors went stale..maka-composer-left-controlsto the Astryx header context (.maka-composer-header-context); the Selector trigger is still a combobox, so only the container selector changed..maka-composer-inneris gone;.maka-composer-astryxnow carries the centered measure (width: min(var(--maka-chat-measure), 100%)).role=button) whose detail mounts on demand, replacing the[data-processing=block]wrapper and its fixture readiness selector.Two assertions tracked deliberate Astryx changes instead of product regressions: the turn gap is now 16px (
ChatMessageList density=compact gap={4}), and a fully pinned scroller can read a 1px distance because Chromium keeps sub-pixelscrollTopvalues (observed 30106.5), so the pin contract accepts<= 1px.Verification
npx playwright test(apps/desktop): 93 passed — full suite green, including the 8 previously failing tests.npm run format:checkandnpm run lint: clean (specs live under the formatter-excludedapps/desktop/**).