Skip to content

fix: align notification timing with UI refresh and unify panel/tray sections#53

Merged
ibetitsmike merged 4 commits intomainfrom
mike/fix-notification-ui-sync
Mar 13, 2026
Merged

fix: align notification timing with UI refresh and unify panel/tray sections#53
ibetitsmike merged 4 commits intomainfrom
mike/fix-notification-ui-sync

Conversation

@ibetitsmike
Copy link
Collaborator

@ibetitsmike ibetitsmike commented Mar 13, 2026

What

Four improvements to notification/UI consistency and tray menu.

1. Notifications fire after UI update, before avatar fetch

Reordered the background poller so notifications fire after state update + frontend emit but before avatar fetching.

2. Added Mergeable and Checks Running sections to tray menu

Tray and panel now show the same 10 sections in the same order.

3. Recently Merged opens the panel in focused mode

Clicking Recently Merged (N) in the tray opens the panel showing only that section — expanded with all items visible. A back button returns to the full view.

4. Supporting infrastructure

  • Shared RECENTLY_MERGED_SECTION_TITLE constant
  • expandAll prop on PRSection (forces expanded + shows all items)
  • focusSection/onClearFocus props on PRPanel
  • show-merged Tauri event from Rust → frontend
  • Testable mock helpers for Tauri event/invoke APIs
  • 4 new tests (21 total)

Files changed

Area Files
Rust src-tauri/src/poller.rs, src-tauri/src/menu.rs, src-tauri/src/lib.rs
Frontend src/App.svelte, src/lib/PRPanel.svelte, src/lib/PRSection.svelte, src/lib/stores.ts, src/lib/constants.ts
Mocks src/__mocks__/tauri-api.ts, src/__mocks__/tauri-event.ts
Tests src/App.test.ts, src/lib/components.test.ts

Copy link

@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: 5afb3b85f8

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

@ibetitsmike ibetitsmike force-pushed the mike/fix-notification-ui-sync branch from 5a74b55 to 31e5dfb Compare March 13, 2026 12:49
@ibetitsmike
Copy link
Collaborator Author

@codex review

Move notification dispatch to run after state update and frontend emit
but before avatar fetching and tray menu rebuild. This ensures:
- UI reflects the change before the notification appears
- Notifications aren't delayed by slow avatar downloads
@ibetitsmike ibetitsmike force-pushed the mike/fix-notification-ui-sync branch from 31e5dfb to 806b44d Compare March 13, 2026 12:52
@ibetitsmike
Copy link
Collaborator Author

Fixed: moved notification dispatch before avatar fetch so notifications aren't delayed by slow avatar downloads. Thread resolved.

@codex review

Copy link

@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: 31e5dfb76c

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

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Chef's kiss.

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

@ibetitsmike
Copy link
Collaborator Author

Previous review was on a stale commit. The current code already has notifications dispatched before avatar fetch (line 66-80 in poller.rs, avatar fetch starts at line 82). Both threads resolved.

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 👍

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

@ibetitsmike
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

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

@ibetitsmike
Copy link
Collaborator Author

@codex review

Copy link

@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: 5f0fe8b503

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

When clicking 'Recently Merged' in the tray menu, the panel opens
showing only that section, expanded with all items visible. A back
button returns to the full panel view.

- Rust: emit show-merged event from open_panel handler
- App.svelte: listen for show-merged, manage focusSection state
- PRPanel: filter to focused section, show back control
- PRSection: expandAll prop forces open + shows all items
- Shared RECENTLY_MERGED_SECTION_TITLE constant
- focusSection cleared on logout, auth-cleared, and settings nav
@ibetitsmike
Copy link
Collaborator Author

Fixed: focusSection now cleared in handleLogout() too. Thread resolved.

@codex review

@ibetitsmike ibetitsmike force-pushed the mike/fix-notification-ui-sync branch from 5f0fe8b to e01201f Compare March 13, 2026 17:53
@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Keep them coming!

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

@ibetitsmike ibetitsmike merged commit e4157a7 into main Mar 13, 2026
7 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