Add local Codex session analytics drilldowns#622
Add local Codex session analytics drilldowns#622Undertone0809 wants to merge 4 commits intosteipete:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08b2c5fb14
ℹ️ 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".
| let submenu = NSMenu() | ||
| submenu.autoenablesItems = false | ||
| submenu.delegate = self | ||
| self.populateSessionAnalyticsSubmenu(submenu) |
There was a problem hiding this comment.
Refresh analytics submenu on every open
This submenu is populated only once at creation time, so subsequent opens reuse stale NSMenuItem content and never call requestCodexSessionAnalyticsRefreshIfStale again. In practice, when no unrelated store/settings invalidation occurs (for example with manual refresh), newly written rollout files are not reflected in Session Analytics until some other action rebuilds the parent menu or the user changes window size, which makes the drilldown silently outdated.
Useful? React with 👍 / 👎.
|
This update fixes a performance problem: once the local The fix was to move that work out of the interaction path. Session analytics are now stored in a local cached index, loaded at startup, and served from memory when the menu or hover UI opens. If local |
|
@steipete What do you think of this feature? |
What changed
Why
User impact
Validation
pnpm checkswift test --filter CodexSessionAnalyticsLoaderTestsswift test --filter SettingsStoreCoverageTestsswift test --filter "codex menu includes session analytics submenu when snapshot is present"swift test --filter "codex session analytics submenu exposes empty state without local data"./Scripts/compile_and_run.sh