Skip to content

feat(healthcheck-frontend): group old checks, resolve env names, stack run timestamps#405

Merged
enyineer merged 1 commit into
mainfrom
feat/healthcheck-overview-old-checks-env-names
Jul 3, 2026
Merged

feat(healthcheck-frontend): group old checks, resolve env names, stack run timestamps#405
enyineer merged 1 commit into
mainfrom
feat/healthcheck-overview-old-checks-env-names

Conversation

@enyineer

@enyineer enyineer commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

Polish for the health-check system overview and run-history surfaces, from three rounds of user feedback.

1. "Old checks" grouping (orphaned env slices)

When a system's environments change, a check can be left with slices that no longer receive runs. These now render in a collapsed "Old checks" disclosure instead of masquerading as live checks. Their history is preserved. Detected cases:

  • the env-less leftover of a check that has since fanned out to environments,
  • a slice for an environment that was removed from the system,
  • the case where all environments are removed (the env-less slice becomes live again; the old per-env slices become old).

Opt-out ("none") env-less checks and plain no-environment checks correctly stay live. Detection uses the system's current catalog environments as the source of truth and is extracted into a pure, unit-tested module (overviewRows.logic.ts, 9 tests).

2. Environment name resolution for old runs

Environment pills resolved names only from environments currently assigned to a system, so a run for a later-unassigned environment showed its raw id. Names are now resolved from all environments (listEnvironments) across the overview, the drawer's Recent Runs, and the Run History page (new shared useEnvironmentLabels hook). An environment that was actually deleted reads as "Removed environment" rather than a UUID. Run lists gate their loading on the labels so a still-loading env can't briefly flash as "Removed".

3. Stacked run timestamps

The "Recent Runs" table now stacks the absolute datetime over the relative "x ago" string, instead of hiding the datetime behind a hover tooltip.

4. Unified environment pill

Extracted a single EnvironmentPill primitive with context-independent sizing, so pills render at the same size inside the "Old checks" group as in the live list.

Note on run-detail permissions (no code change)

A related report - a system "manager" unable to see run details / charts - was investigated and is not a code bug: detailed charts and run details are deliberately gated on catalog.system manage (editor/owner), while the overview and Recent Runs table are gated on read (viewer). The affected user holds a read-only (viewer) grant. Fix is to grant that team Manage on the system (or set it as the owning team). Left as-is per decision.

Testing

  • bun run lint - clean
  • bun run typecheck - clean
  • bun test overviewRows.logic.test.ts - 9 pass

Docs

No public API / schema / contract change; frontend-only UI. No docs update required.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CaGbNufbgngS1uhFT5oKjd

…k run timestamps

System overview and run-history polish:

- Detect health-check slices that no longer receive runs after an environment
  change (env-less leftover of a now-fanned-out check, a removed environment's
  slice, and the all-environments-removed case) and group them under a
  collapsed "Old checks" disclosure. History is preserved.
- Resolve environment pill names from all environments (not just those still
  assigned to a system) across the overview, the drawer's Recent Runs, and the
  Run History page, so an unassigned environment shows its name instead of its
  raw id. A deleted environment reads as "Removed environment".
- Extract a single EnvironmentPill primitive with context-independent sizing so
  pills render identically inside the "Old checks" group and the live list.
- Stack the absolute run datetime over the relative "x ago" string instead of
  hiding the datetime behind a hover tooltip.

Orphan-detection logic is extracted into a pure, unit-tested module
(overviewRows.logic.ts).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CaGbNufbgngS1uhFT5oKjd
@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fcce45e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@checkstack/healthcheck-frontend Minor
@checkstack/anomaly-frontend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

✅ All PR Checks Passed

Check Status
Typecheck ✅ Passed
Lint ✅ Passed
Deps ✅ Passed
Test ✅ Passed
Integration ✅ Passed
Security ✅ Passed
E2E ✅ Passed

@enyineer All quality checks have passed. This PR is ready for your review.

@enyineer enyineer merged commit 67b50f5 into main Jul 3, 2026
17 checks passed
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