Repository navigation
Phase 5d: multi-source status bars, widget placements - #53
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Status bars become rows of status widgets from any integration, and the infrastructure groups retire.
Model
WidgetgainsPanelIdbesideLinkId, with exactly one set (CK_Widgets_OneOwner), and an optionalLabelthat bars show and tiles don't.WidgetPlacement. The core loads a panel's widgets and passes them inPanelContext.Widgets.IWidgetKind.Placements([Flags] WidgetPlacements:Tile,StatusBar) say where a kind's widgets may go, defaulting from the role (status: both; app: tiles only).WidgetKindsandWidgetPreviewtake aplacement.WidgetFormand backup import refuse a misplaced widget, and limit a tile to 10 widgets and a bar to 20.Editing
_WidgetEditor), configured per placement, with a Label field for bars.modal-lg) edits a bar's Items with it, and posts them with the panel.PanelPreviewhandler gives a live preview of the panel. Its widgets are read one by one, as in the link dialog; that logic moved towidget-preview.js.Migrations (verified against a scratch prod copy)
AddPanelWidgetsis 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.ConvertGroupsToStatusBarWidgetsturns 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.Downrestores the groups and the slug.Backup format 9
widgets(withlabel), andinfrastructureGroupsis gone.UseStatusBarWidgets). A file from before panels gets its groups on the default status bar.Retired
monitor-picker.js, theKumaMonitorshandler andMonitorIdParser.StatusPageSlugvalidator.LinkTileFactoryno longer knows about Kuma) andUptimeKumaSettings.LoadAsync, a "first Kuma connection" special case.Test plan
StatusBarTests: kinds by placement, a second bar with items, replacing and deleting items, limits, delete and Undo, previewContinuousIntegrationBuild=trueis clean, and two fulljb cleanupcodepasses are identical.🤖 Generated with Claude Code