Skip to content

feat(healthcheck): support opt-in non-modal drawers - #4449

Open
astandrik wants to merge 4 commits into
mainfrom
fix/healthcheck-non-modal-4440
Open

astandrik wants to merge 4 commits into
mainfrom
fix/healthcheck-non-modal-4440

Conversation

@astandrik

@astandrik astandrik commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Opening Healthcheck currently hides adjacent panels and their openers from assistive technology. Add the optional healthcheck.disableModal setting so consumers can keep Healthcheck, adjacent panels and the page accessible together. Existing installations retain modal behavior by default.

The opt-in mode stays open when focus leaves, scopes Escape to the focused panel and restores the opener without stealing focus. Drawer names come from their headings. Click capture stays inside the panel content, including nested portals, so veil and sidebar clicks retain their existing dismissal behavior.

UIKit is upgraded to 7.48.0; other locked dependencies are unchanged. Query Settings E2E checks follow each error icon's aria-controls link, and the four affected Linux ErrorDisplay snapshots are updated for the new Alert rendering.

Usage

Configure before rendering the application:

configureUIFactory({
    healthcheck: {
        disableModal: true,
    },
});

This controls focus modality independently of the veil and outside clicks. Consumers must also configure adjacent panels for compatible non-modal behavior.

Verification

  • Eight permanent veil regressions fail on the previous head and pass after the fix; real pointer clicks are hit-tested against the overlay.
  • Drawer behavior, Healthcheck accessibility and the full Query Settings suite: 82/82 passed in Chromium and Safari with retries=0. Includes nested Cancel/Escape, both opening orders, independent close/reopen/reload, focus return and URL cleanup.
  • Four ErrorDisplay snapshots generated and visually inspected in mcr.microsoft.com/playwright:v1.58.0-noble on linux/amd64, with backend http://localhost:8765; all four passed again with snapshot updates disabled.
  • Jest: 237 suites / 2186 tests passed. Typecheck, ESLint/Stylelint/Prettier, embedded build, library package build and diff checks passed; existing unrelated lint warnings remain.
  • Headed before/after recordings confirm restored veil dismissal on actual Healthcheck and Grant access pages with synthetic Healthcheck data.

Browser coverage uses real UI components and isolated local data/mocks. Internal AI integration, native screen-reader acceptance and package release remain follow-up work.

Refs #4440

CI Results

Test Status: ❌ FAILED

📊 Full Report

Total Passed Failed Flaky Skipped
1294 1286 2 6 0
Test Changes Summary ✨15 🗑️17

✨ New Tests (15)

  1. both opening orders: Healthcheck first (sidebar/healthcheckAccessibility.test.ts)
  2. Healthcheck first: Close Healthcheck and reopen (sidebar/healthcheckAccessibility.test.ts)
  3. Healthcheck first: Escape Healthcheck and reopen (sidebar/healthcheckAccessibility.test.ts)
  4. Healthcheck first: Close companion and reopen (sidebar/healthcheckAccessibility.test.ts)
  5. Healthcheck first: Escape companion and reopen (sidebar/healthcheckAccessibility.test.ts)
  6. both opening orders: companion first (sidebar/healthcheckAccessibility.test.ts)
  7. companion first: Close Healthcheck and reopen (sidebar/healthcheckAccessibility.test.ts)
  8. companion first: Escape Healthcheck and reopen (sidebar/healthcheckAccessibility.test.ts)
  9. companion first: Close companion and reopen (sidebar/healthcheckAccessibility.test.ts)
  10. companion first: Escape companion and reopen (sidebar/healthcheckAccessibility.test.ts)
  11. Tab and Shift+Tab reach both panels and the page without dismissing them (sidebar/healthcheckAccessibility.test.ts)
  12. Cancel and Escape dismiss the nested dialog before Healthcheck (sidebar/healthcheckAccessibility.test.ts)
  13. default configuration preserves modal behavior (sidebar/healthcheckAccessibility.test.ts)
  14. modal configuration preserves modal behavior (sidebar/healthcheckAccessibility.test.ts)
  15. wheel over disk popups scrolls the page (storage/vdiskColoring.test.ts)

🗑️ Deleted Tests (17)

  1. keeps paired disk popups open when moving between cards from vdisk (storage/vdiskColoring.test.ts)
  2. keeps paired disk popups open when moving between cards from pdisk (storage/vdiskColoring.test.ts)
  3. wheel over disk popups scrolls the page and clears clipped hover state (storage/vdiskColoring.test.ts)
  4. uses detailed Space colors in disk popups in light theme (storage/vdiskColoring.test.ts)
  5. uses detailed Space colors in disk popups in dark theme (storage/vdiskColoring.test.ts)
  6. selects PDisk Space source with capacity metrics disabled (storage/vdiskColoring.test.ts)
  7. selects PDisk Space source with capacity metrics enabled (storage/vdiskColoring.test.ts)
  8. truncates long location values in single disk popup at 1280px (storage/vdiskPage.test.ts)
  9. truncates long location values in combined disk popup at 1280px (storage/vdiskPage.test.ts)
  10. truncates long location values in single disk popup at 560px (storage/vdiskPage.test.ts)
  11. truncates long location values in combined disk popup at 560px (storage/vdiskPage.test.ts)
  12. keeps long fields within the standard single disk popup width (storage/vdiskPage.test.ts)
  13. keeps long fields within the standard combined disk popup width (storage/vdiskPage.test.ts)
  14. closes PDisk popup after leaving a focused control (storage/vdiskPage.test.ts)
  15. closes VDisk popup after leaving a focused control (storage/vdiskPage.test.ts)
  16. renders a slot-only donor popup with available location data (storage/vdiskPage.test.ts)
  17. shows placeholders for missing disk popup fields (storage/vdiskPage.test.ts)

Bundle Size: 🔽

Current: 65.27 MB | Main: 65.30 MB
Diff: 0.03 MB (-0.05%)

✅ Bundle size decreased.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

RetriggerConfidence Score: 5/5 Tier: plus

No blocking code issue was established; the real compact opener’s focus-return path still needs browser coverage.

Fix All in CodexFindings

  1. P2 Real opener focus goes untested ▶
Fix with agent prompt
### Issue 1
tests/suites/sidebar/healthcheckAccessibility.test.ts:23-24
The new browser checks focus the `Open Healthcheck` button before opening the drawer. The real compact opener is a clickable `Label`, so these checks never test focus return from it. Add a non-modal check through the real opener; otherwise a focus-return failure on the page could go unnoticed.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary

Healthcheck drawers gain an opt-in non-modal mode, so the page and nearby panels can stay accessible while the drawer is open. The default remains modal, and the change also upgrades UIKit and updates related UI checks.

  • Adds healthcheck.disableModal and keeps focus, Escape, and dismissal behavior scoped to each drawer.
  • Adds browser coverage for two accessible panels, nested dialogs, and real veil clicks.
  • Upgrades UIKit to 7.48.0 and updates Query Settings checks and ErrorDisplay snapshots.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Open Healthcheck] --> B{Non-modal setting enabled?}
    B -- No --> C[Keep modal focus behavior]
    B -- Yes --> D[Keep page and other panels reachable]
    D --> E[Focus leaves: keep Healthcheck open]
    D --> F[Escape inside Healthcheck: close it]
    F --> G[Return focus when safe]
Loading

Reviews (2) · Last reviewed commit: "test(healthcheck): trim duplicate drawer..."

Keep click capture inside the panel while retaining the keyboard boundary. Cover veil clicks, URL cleanup and nested dialog dismissal. Refs #4440
Resolve validation popovers through aria-controls and refresh four reviewed Linux ErrorDisplay snapshots. Refs #4440
Reuse the Healthcheck fixture and keep focus restoration checks alongside
the browser interaction matrix. Check reload once per opening order and
make the external-close test detect focus stealing.
@astandrik
astandrik marked this pull request as ready for review October 2, 2026 14:06
Copilot AI balanced review requested due to automatic review settings October 2, 2026 14:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T14:10:22.489021Z 49ebc43 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The opt-in behavior preserves existing defaults and is supported by focused unit and cross-browser regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Adds opt-in non-modal Healthcheck drawers to satisfy #4440 while preserving existing modal behavior.

Changes:

  • Adds healthcheck.disableModal with scoped Escape and focus restoration.
  • Improves drawer naming, portal click handling, and accessibility coverage.
  • Upgrades Gravity UIKit to 7.48.0 and updates affected tests.
File Description
src/​components/​Drawer/​Drawer.tsx Implements non-modal drawer behavior and naming.
src/​components/​Drawer/​Drawer.scss Styles the event boundary wrapper.
src/​components/​Drawer/​__test__/​DrawerAccessibility.test.tsx Tests focus restoration and adjacent panels.
src/​components/​Search/​__test__/​Search.test.tsx Adds required UIKit theme context.
src/​containers/​Tenant/​Healthcheck/​components/​HealthcheckDrawer.tsx Applies the Healthcheck configuration.
src/​containers/​Tenant/​Healthcheck/​components/​__test__/​HealthcheckDrawerExtension.test.tsx Tests modal configuration propagation.
src/​index.tsx Loads the E2E drawer fixture.
src/​types/​window.d.ts Types the E2E fixture mode.
src/​uiFactory/​types.ts Exposes the consumer setting.
tests/​fixtures/​healthcheckDrawer.tsx Provides paired-panel test scenarios.
tests/​suites/​sidebar/​drawerBehavior.test.ts Adds real veil-dismissal regressions.
tests/​suites/​sidebar/​healthcheckAccessibility.test.ts Covers accessibility and focus behavior.
tests/​suites/​tenant/​queryEditor/​models/​SettingsDialog.ts Resolves error popovers through ARIA links.
tests/​suites/​tenant/​queryEditor/​querySettings.test.ts Verifies timeout validation messages.
tests/​utils/​clickDrawerVeil.ts Adds hit-tested veil clicking.
package.json Upgrades Gravity UIKit.
package-lock.json Locks UIKit 7.48.0.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +23 to +24
async function openPanel(page: Page, name: Panel) {
await page.getByRole('button', {name: `Open ${name}`, exact: true}).focus();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Real opener focus goes untested

The new browser checks focus the Open Healthcheck button before opening the drawer. The real compact opener is a clickable Label, so these checks never test focus return from it. Add a non-modal check through the real opener; otherwise a focus-return failure on the page could go unnoticed.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/suites/sidebar/healthcheckAccessibility.test.ts
Line: 23-24

Comment:
**Real opener focus goes untested**

The new browser checks focus the `Open Healthcheck` button before opening the drawer. The real compact opener is a clickable `Label`, so these checks never test focus return from it. Add a non-modal check through the real opener; otherwise a focus-return failure on the page could go unnoticed.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Codex

@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerTREX TREX

No flows tested, and faced 1 obstacle.

Obstacles faced

  • The tester reports “Root already exists”; reset the agent runtime so it can launch.

To reduce obstacles, configure your TREX environment.

This branch has not been deployed

No deployments
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.

2 participants