Skip to content

Add notification history panel with tabbed bottom panel#78

Open
an0nn30 wants to merge 7 commits intomainfrom
feat/notification-history
Open

Add notification history panel with tabbed bottom panel#78
an0nn30 wants to merge 7 commits intomainfrom
feat/notification-history

Conversation

@an0nn30
Copy link
Copy Markdown
Owner

@an0nn30 an0nn30 commented Mar 25, 2026

Summary

Adds a tabbed bottom panel with a built-in Notifications history tab that logs all toast notifications from the current session. Plugins that register bottom panels get their own tabs alongside it.

  • Every toast (in-app and native) is recorded in an in-memory history array
  • Bottom panel header becomes a tab bar: [Notifications] [Plugin A] [Plugin B]
  • Notification entries show timestamp, colored level dot, title, and body
  • Clear button empties the history
  • Live updates: new notifications appear immediately when the panel is open
  • History resets on app restart (in-memory only, no disk persistence)
  • Bottom panel visibility persisted in state.toml across sessions
  • Plugin bottom panels routed to the tab system via existing panel registration

Changes

File What
frontend/toast.js getHistory(), onNotification(), clearHistory() API
frontend/notification-panel.js New module: tab management, history renderer, plugin tab API
frontend/index.html Bottom panel HTML/CSS restructured for tabs, notification entry styles, init + persistence wiring
frontend/plugin-widgets.js Route bottom-panel plugins to notification panel tabs
src/lib.rs bottom_panel_visible in SavedLayout/WindowLayout

Test plan

  • cargo test --workspace — 346 tests pass
  • Toggle bottom panel (Cmd+Shift+J) — Notifications tab visible
  • Trigger toasts — entries appear with timestamp, level dot, title/body
  • Click Clear — history empties
  • Close/reopen panel — history preserved within session
  • Restart app — history is empty
  • Panel visibility persists across sessions

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b142938888

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

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
);
}
return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid dropping bottom-panel widget updates prematurely

This early return diverts plugin-widgets-updated events away from the legacy [data-plugin-handle] container path, but frontend/index.html still creates those sidebar containers for every plugin-panel-registered event and does an initial request_plugin_render there. For bottom panels, that leaves a duplicated sidebar copy that never refreshes after the first render while the tab view keeps updating, which produces inconsistent UI state. Either stop creating sidebar containers for location === 'bottom' or keep updating them until that registration path is migrated.

Useful? React with 👍 / 👎.

});

// Listen for plugin panel removal and clean up bottom panel tabs.
listen('plugin-panel-removed', (event) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use an emitted event for plugin-tab removal

The tab cleanup listener is wired to plugin-panel-removed, but there is no emitter for that event in the current backend paths (I checked crates/conch_tauri/src/plugins/tauri_host_api.rs, which only emits plugin-panel-registered and plugin-widgets-updated). Because this callback never runs, disabling/unloading a plugin leaves stale bottom-panel tabs in the UI for the rest of the session.

Useful? React with 👍 / 👎.

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