Move notifications to the declarative status bar #89
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#89
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Move the required notifications plugin off the imperative status-bar compatibility
host and onto the API-owned declarative status-bar registry.
Problem
The workspace status bar now renders API-owned declarative items from
app.statusBar, whilePlugin.addStatusBarItem()remains mounted only as theObsidian-compatible raw DOM escape hatch. The required notifications plugin is
still using that compatibility path for its main status trigger, even though it
is first-party app chrome and should exercise the preferred declarative path.
That leaves one of the release-critical daily-use surfaces on the older
imperative host and weakens confidence that the declarative status-bar contract
can support dynamic first-party status UI such as background progress,
notification counts, context-key visibility, tooltips, and command dispatch.
Goal
Use the declarative status-bar registry for the notifications status trigger
while preserving the current user-facing behavior:
notification center
Plugin.addStatusBarItem()callersScope
app.statusBarinstead ofPlugin.addStatusBarItem().@lapis-notes/notifications.changes.
Non-goals
descriptor unless the simpler command-driven design proves insufficient.
Plugin.addStatusBarItem()or break Obsidian-compatible plugins.broader notification service.
output-channel work.
Acceptance Criteria
NotificationsPluginno longer callsaddStatusBarItem()for its main statustrigger.
app.statusBarwith stableitem IDs, priority, alignment, tooltip, command, and
whenvisibility.unread notifications, and overall notification status availability.
percent when available,
N moreaggregation, and no volatile file paths in theinline label.
notification center.
surface or an equivalent notifications-owned center.
Obsidian-style plugins using
Plugin.addStatusBarItem(), continue to render.aggregation, and opening the notification center from the declarative item.
when-gated visibility.spec.mdfiles document the new ownership andvalidation expectations.
Implementation Notes
Add dynamic status-bar item updates in the API.
Extend
StatusBarManagerwith an update or upsert path so the notificationsplugin can update text, icon, tooltip, command, and visibility without
unregistering and re-registering items. Add focused Vitest coverage in
packages/api/src/lib/__tests__/status-bar.test.ts.Use scoped context keys for visibility.
In
NotificationsPlugin.onload(), register plugin-scoped keys such as:plugin.plugin-notifications.visibleplugin.plugin-notifications.hasProgressplugin.plugin-notifications.hasUnreadRegister declarative status items with
whenclauses instead of mounting DOMinto the status bar.
Split notification status state from the Svelte trigger.
Extract the current label, tooltip, task derivation, and unread-count logic
from
notification-status-item.svelteinto a small helper or model module sothe plugin runtime and notification center UI share the same formatting
behavior.
Replace
addStatusBarItem()usage.Remove
mountStatusBar()anddestroyStatusBar()fromnotifications-plugin.ts. Register declarative items instead:when: plugin.plugin-notifications.hasProgresswhen: !plugin.plugin-notifications.hasProgress && plugin.plugin-notifications.visiblePreserve the notification center.
Because the current declarative status bar does not support arbitrary Svelte
popover content, register a command such as
plugin-notifications:toggle-center. The declarative item invokes thatcommand. The plugin can render a separate notification-center overlay or
panel owned by the notifications package and positioned above the status bar
without using the compatibility status-bar DOM host.
Update workspace renderer support if needed.
Add a stable diagnostic attribute such as
data-status-bar-item-id={item.id}to declarative status buttons so tests cantarget declarative items without relying on text or DOM order.
Update tests.
whenvisibility withcontext keys.
notifications-status-bar.spec.tsto targetdeclarative status items and verify the same compact label, tooltip,
aggregation, and center-opening behavior.
imperative callers.
Update specs.
Touch at least:
spec/src/20-packages/plugins/notifications/index.mdpackages/plugins/plugin-notifications/spec.mdspec/src/20-packages/workspace/index.mdpackages/workspace/spec.mdpackages/api/spec.mdif the status-bar manager API changesSuggested Files or Specs To Inspect
packages/api/src/lib/status-bar.svelte.tspackages/api/src/lib/plugin.tspackages/api/src/lib/__tests__/status-bar.test.tspackages/workspace/src/lib/components/status-bar/status-bar.sveltepackages/workspace/e2e/notifications-status-bar.spec.tspackages/plugins/plugin-notifications/src/notifications-plugin.tspackages/plugins/plugin-notifications/src/notification-status-item.sveltepackages/plugins/plugin-notifications/spec.mdspec/src/20-packages/plugins/notifications/index.mdspec/src/20-packages/workspace/index.mdspec/src/30-cross-package-contracts/plugin-system/design.mdspec/src/50-roadmap/complete-daily-use-app.mdValidation Commands
Follow-up Tasks
first-party or manifest-only contributors need component-hosted UI.
first-party surfaces after this migration lands.
Implementation Summary
Moved notifications off Plugin.addStatusBarItem onto app.statusBar with API upsert support, plugin-scoped visibility context keys, a command-opened notification center panel, declarative status-bar e2e coverage, and synced API/workspace/notifications specs.