Skip to content

Phase 5d: multi-source status bars, widget placements - #53

Merged
cerebrate merged 1 commit into
masterfrom
feature/phase5d-status-bars
Oct 17, 2026
Merged

cerebrate merged 1 commit into
masterfrom
feature/phase5d-status-bars

Conversation

@cerebrate

Copy link
Copy Markdown
Member

Summary

Status bars become rows of status widgets from any integration, and the infrastructure groups retire.

Model

  • A widget belongs to a link or a panel: Widget gains PanelId beside LinkId, with exactly one set (CK_Widgets_OneOwner), and an optional Label that bars show and tiles don't.
  • Panel kinds declare a WidgetPlacement. The core loads a panel's widgets and passes them in PanelContext.Widgets.
  • Placements: IWidgetKind.Placements ([Flags] WidgetPlacements: Tile, StatusBar) say where a kind's widgets may go, defaulting from the role (status: both; app: tiles only).
    • WidgetKinds and WidgetPreview take a placement.
    • WidgetForm and backup import refuse a misplaced widget, and limit a tile to 10 widgets and a bar to 20.
  • Several status bars: the kind is no longer single-instance. Each bar has an optional Title (shown at its start) and Link (such as a status page).

Editing

  • The link dialog's widgets section is now a shared partial (_WidgetEditor), configured per placement, with a Label field for bars.
  • The panel dialog (now modal-lg) edits a bar's Items with it, and posts them with the panel.
  • Undo snapshots of a deleted panel carry its widgets.
  • The new PanelPreview handler gives a live preview of the panel. Its widgets are read one by one, as in the link dialog; that logic moved to widget-preview.js.

Migrations (verified against a scratch prod copy)

  • AddPanelWidgets is the schema change. It's a separate migration because SQLite rebuilds a changed table only at the end of its migration, so data SQL can't follow it in the same one.
  • ConvertGroupsToStatusBarWidgets turns each group into a Kuma monitor widget on the first bar: labelled with the group's name, response time off, uptime as the bar showed it, order kept. Kuma's status page becomes that bar's link, the slug leaves the connection, and the table is dropped.
  • With no Kuma connection, the groups are dropped. Down restores the groups and the slug.

Backup format 9

  • Panels carry widgets (with label), and infrastructureGroups is gone.
  • Older files convert the same way (UseStatusBarWidgets). A file from before panels gets its groups on the default status bar.

Retired

  • The infrastructure groups: their Settings section, handlers, dialog and script.
  • monitor-picker.js, the KumaMonitors handler and MonitorIdParser.
  • Kuma's status page slug, its Test check, the status page client and the StatusPageSlug validator.
  • Kuma badge URLs (LinkTileFactory no longer knows about Kuma) and UptimeKumaSettings.LoadAsync, a "first Kuma connection" special case.
  • Settings now carries nothing integration-specific.

Test plan

  • New tests:
    • StatusBarTests: kinds by placement, a second bar with items, replacing and deleting items, limits, delete and Undo, preview
    • migration tests: groups to items and back, no Kuma
    • backup tests: v8 and v1 conversions, no Kuma, round trip, widgets on a panel that holds none
    • widget form tests: placements, labels, limits
  • Full suite passes: 576 tests. The Release build with ContinuousIntegrationBuild=true is clean, and two full jb cleanupcode passes are identical.
  • Migrated a fresh scratch copy of the prod database:
    • 3 groups became labelled items, the status page became the bar's link, and the slug was removed
    • the 9 link widgets are intact, and the foreign key check is clean
  • Browser trial on that copy against a fake Kuma:
    • the bar renders as pills
    • the panel dialog lists, edits and previews items (the result line, and Save held while an item is open)
    • adding a second, titled bar works
    • the field IDs no longer clash between the two dialogs
  • Soak on prod (export a backup first).

🤖 Generated with Claude Code

A status bar's items are now widgets the panel owns: Widget gains a
PanelId beside LinkId (exactly one, by check constraint) and an optional
Label the bar shows. Widget kinds declare their Placements (Tile,
StatusBar), defaulting from their role, and the dialogs, WidgetForm and
import accept a kind only where it's allowed. Status bars are no longer
single-instance and have an optional title and link; the panel dialog
edits their items with the shared widget editor, with a live preview.

The migrations turn each infrastructure group into a labelled Uptime
Kuma monitor widget on the first bar, make Kuma's status page the bar's
link, and drop the groups (AddPanelWidgets holds the schema change,
since SQLite rebuilds a table only at the end of its migration). Backup
format 9 carries panels' widgets and converts older files the same way.

Retired: the infrastructure groups and their Settings section, the
monitor picker and KumaMonitors handler, MonitorIdParser, Kuma's status
page slug and status page client, Kuma badge URLs, and
UptimeKumaSettings.LoadAsync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cerebrate
cerebrate merged commit 68f8fed into master Oct 17, 2026
7 checks passed
@cerebrate
cerebrate deleted the feature/phase5d-status-bars branch October 17, 2026 20:10
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