Skip to content

fix(desktop): realign real-window smoke diagnostic with Base UI Dialog modal - #80

Merged
Astro-Han merged 1 commit into
mainfrom
claude/smoke-modal-selectors
Jun 21, 2026
Merged

Astro-Han merged 1 commit into
mainfrom
claude/smoke-modal-selectors

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

What

The search modal migrated to the Base UI Dialog primitives, which silently dropped the selectors the real-window smoke diagnostic relied on:

  • the backdrop stopped carrying .maka-search-modal-backdrop
  • the focused input lost the maka-search-modal-input class to InputGroup's own utility classes

As a result the programmatic-search-modal-open and programmatic-focus-target smoke checks failed on a clean tree (reproduced identically on main). This is stale harness, not a product regression — the modal renders and traps focus correctly; only the diagnostic's selectors had drifted.

Changes

  • packages/ui/src/ui.tsx — give the shared DialogBackdrop a style-free maka-dialog-backdrop hook so the diagnostic can select the backdrop reliably (Base UI otherwise renders only drifting utility classes).
  • apps/desktop/src/main/main.ts — query .maka-dialog-backdrop, and detect the focus trap structurally via closest('.maka-search-modal') instead of a brittle class on the focused element.
  • scripts/desktop-real-window-smoke.mjs — focus check accepts any interactive control (input or button) trapped inside the modal.
  • apps/desktop/src/renderer/styles.css — drop the dead .maka-search-modal-backdrop rule (no element carries it after the Dialog migration).
  • tests — add smoke-diagnostic-contract.test.ts binding the diagnostic to the stable hook so it can't drift again, and realign the existing real-window-smoke-contract assertion to the structural focus check.

Verification

  • npm --workspace @maka/desktop run smoke:programmatic-window → 6/6 checks PASS (previously 2 FAILed).
  • npm --workspace @maka/desktop test → 1528/1529 pass.

Status — rebased onto post-#79 main

The previously-noted app-icon failure was a pre-existing main breakage owned by #79. That PR has merged (squash 989632f8) and this PR is now rebased onto the updated main, so the icon assertion passes. The full desktop suite is green here except for one flaky, unrelated test (rive-workflow-tool → "kills and reaps a Rive child that ignores SIGTERM on abort") — a timing-sensitive subprocess-reap check that passes on isolated re-run (3/3). This PR stays scoped to the smoke-harness drift and touches neither the icon nor the Rive code.

https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD

…g modal

The search modal's migration to the Base UI Dialog primitives dropped the
selectors the real-window smoke diagnostic relied on: the backdrop no longer
carried `.maka-search-modal-backdrop`, and the focused input lost the
`maka-search-modal-input` class to InputGroup's own utility classes. Both the
`programmatic-search-modal-open` and `programmatic-focus-target` checks failed
on a clean tree (reproduced identically on main) — stale harness, not a
product regression.

- ui.tsx: give the shared DialogBackdrop a style-free `maka-dialog-backdrop`
  hook so the diagnostic can select the backdrop reliably; Base UI otherwise
  renders only drifting utility classes.
- main.ts: query `.maka-dialog-backdrop`, and detect the focus trap
  structurally via closest('.maka-search-modal') instead of a brittle class on
  the focused element.
- desktop-real-window-smoke.mjs: focus check accepts any interactive control
  (input or button) trapped inside the modal.
- styles.css: drop the dead `.maka-search-modal-backdrop` rule (no element
  carries it after the Dialog migration).
- add smoke-diagnostic-contract.test.ts and realign the existing
  real-window-smoke-contract assertion to the structural focus check.

All 6 programmatic smoke checks now PASS.

Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
@Astro-Han
Astro-Han force-pushed the claude/smoke-modal-selectors branch from d85982c to e2fcad5 Compare June 21, 2026 13:43
@Astro-Han
Astro-Han merged commit 3b67d38 into main Jun 21, 2026
@Astro-Han
Astro-Han deleted the claude/smoke-modal-selectors branch June 21, 2026 14:16
jackwener pushed a commit that referenced this pull request Jun 21, 2026
…g modal (#80)

The search modal's migration to the Base UI Dialog primitives drifted the
real-window smoke diagnostic's selectors, failing two programmatic checks on a
clean tree. Bind the diagnostic to a stable `maka-dialog-backdrop` hook and
detect the focus trap structurally; drop the dead `.maka-search-modal-backdrop`
rule. All 6 programmatic smoke checks pass.

Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener pushed a commit that referenced this pull request Jun 21, 2026
…g modal (#80)

The search modal's migration to the Base UI Dialog primitives drifted the
real-window smoke diagnostic's selectors, failing two programmatic checks on a
clean tree. Bind the diagnostic to a stable `maka-dialog-backdrop` hook and
detect the focus trap structurally; drop the dead `.maka-search-modal-backdrop`
rule. All 6 programmatic smoke checks pass.

Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener pushed a commit that referenced this pull request Jun 21, 2026
…g modal (#80)

The search modal's migration to the Base UI Dialog primitives drifted the
real-window smoke diagnostic's selectors, failing two programmatic checks on a
clean tree. Bind the diagnostic to a stable `maka-dialog-backdrop` hook and
detect the focus trap structurally; drop the dead `.maka-search-modal-backdrop`
rule. All 6 programmatic smoke checks pass.

Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener pushed a commit that referenced this pull request Jun 21, 2026
…g modal (#80)

The search modal's migration to the Base UI Dialog primitives drifted the
real-window smoke diagnostic's selectors, failing two programmatic checks on a
clean tree. Bind the diagnostic to a stable `maka-dialog-backdrop` hook and
detect the focus trap structurally; drop the dead `.maka-search-modal-backdrop`
rule. All 6 programmatic smoke checks pass.

Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener pushed a commit that referenced this pull request Jun 21, 2026
…g modal (#80)

The search modal's migration to the Base UI Dialog primitives drifted the
real-window smoke diagnostic's selectors, failing two programmatic checks on a
clean tree. Bind the diagnostic to a stable `maka-dialog-backdrop` hook and
detect the focus trap structurally; drop the dead `.maka-search-modal-backdrop`
rule. All 6 programmatic smoke checks pass.

Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener pushed a commit that referenced this pull request Jun 21, 2026
…g modal (#80)

The search modal's migration to the Base UI Dialog primitives drifted the
real-window smoke diagnostic's selectors, failing two programmatic checks on a
clean tree. Bind the diagnostic to a stable `maka-dialog-backdrop` hook and
detect the focus trap structurally; drop the dead `.maka-search-modal-backdrop`
rule. All 6 programmatic smoke checks pass.

Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant