Skip to content

feat(healthcheck): expose drawer target to extensions - #4421

Open
astandrik wants to merge 4 commits into
mainfrom
codex/healthcheck-drawer-target-20260928
Open

astandrik wants to merge 4 commits into
mainfrom
codex/healthcheck-drawer-target-20260928

Conversation

@astandrik

@astandrik astandrik commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #4446.

Healthcheck drawer extensions currently receive no target, so a consumer cannot restore cluster/database context on a passive drawer reopen, especially while Healthcheck is loading, has failed, or has no issues.

Pass the existing HealthcheckAssistantTarget to renderDrawerExtension through the exported HealthcheckDrawerExtensionProps. All four drawer owners provide the target from their inputs, and target changes reach the existing mounted extension. Callbacks that ignore arguments remain compatible; a missing target leaves automatic binding to the consumer.

Validation:

  • Regression tests for all four owners, loading/error/empty states, missing target, target updates without remount, and existing zero-argument callbacks.
  • Full Jest suite, typecheck and lint pass; library package and embedded production builds pass.
  • Packed artifact installed in a disposable consumer: typecheck and browser integration confirm same-owner reopen preserves target/history. The consumer owns chat state and permission handling; this PR only supplies the public target contract.

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
1266 1262 0 4 0

😟 No changes in tests. 😕

Bundle Size: ✅

Current: 65.17 MB | Main: 65.17 MB
Diff: +2.53 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ 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

The PR appears safe to merge; no outstanding issue was found in its changes.

What we checked:

  • Target missing while health loads: The drawer passes its target independently of the health content. The drawer test checks that the extension stays mounted and receives the target through those states.
  • Target update resets the extension: The drawer updates its callback when the target changes. The test checks that the extension receives the new target while keeping the same mounted element.
Summary

Healthcheck drawer extensions now receive the cluster or database target for the open drawer. The target is available even when Healthcheck data is loading or unavailable, so extensions can keep track of drawer context.

  • All four drawer owners pass a target based on their cluster or database inputs.
  • The extension props type is exported for library consumers.
  • Tests cover target delivery, target changes, and data states.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Four healthcheck drawer owners] --> B[HealthcheckDrawer]
    B --> C[renderDrawerExtension]
    B --> D[Healthcheck content]
    A -->|current target| B
    B -->|target prop| C
Loading

Reviews (2) · Last reviewed commit: "chore: merge main into healthcheck drawe..."

Copilot AI lite review requested due to automatic review settings September 28, 2026 11:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 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-01T14:57:20.885485Z 1cde3d9 New commits
ℹ️ 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

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Exposes Healthcheck drawer targets to extensions so consumers can preserve cluster/database context across drawer states and reopen flows.

Changes:

  • Adds and exports HealthcheckDrawerExtensionProps.
  • Supplies targets from all four drawer owners.
  • Adds regression coverage for propagation, updates, and compatibility.
  • Documents the feature in the changelog.
File Description
src/​uiFactory/​types.ts Defines the public extension props and callback signature.
src/​lib.ts Exports the new public type.
src/​containers/​Tenants/​DatabaseDrawerHealthcheck.tsx Provides the database-list target.
src/​containers/​Tenant/​TenantDrawerHealthcheck.tsx Provides the tenant target.
src/​containers/​Tenant/​Healthcheck/​components/​HealthcheckDrawer.tsx Passes target data to extensions.
src/​containers/​Tenant/​Healthcheck/​components/​__test__/​HealthcheckDrawerTargets.test.tsx Tests target propagation across drawer owners.
src/​containers/​Tenant/​Healthcheck/​components/​__test__/​HealthcheckDrawerExtension.test.tsx Tests extension updates and compatibility.
src/​containers/​Clusters/​ClusterDrawerHealthcheck.tsx Provides the cluster-list target.
src/​containers/​Cluster/​ClusterDrawerHealthcheck.tsx Provides the cluster-page target.
CHANGELOG.md Documents the feature.

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

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 public contract, owner integrations, compatibility behavior, and relevant edge states are consistently covered.

Review effort: Balanced
Findings: None

@astandrik

Copy link
Copy Markdown
Contributor Author

@greptileai

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.

[Healthcheck AI] Передавать цель Healthcheck drawer расширениям

2 participants