Repository navigation
FEAT: browse slash commands from an in-memory catalogue tree - #86
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Cache invalidation and empty-menu serialization introduce browsing failures and stale submenu reuse.
3 open issues
What changed in this PR
Adds a shared, in-memory command catalogue cache to make terminal and browser slash-command browsing faster.
Changes:
- Warms root catalogues and retains submenus with bounded storage and expiry.
- Adds immediate terminal cache hits and explicit refresh bypasses.
- Preserves fresh action validation and adds cache, navigation, and refresh regressions.
| File | Description |
|---|---|
| web/tests/browser.spec.ts | Checks explicit refresh requests. |
| web/src/SessionCommands.svelte | Sends cache-bypassing refresh requests. |
| README.md | Documents cache lifetime and refresh behavior. |
| internal/web/dist/index.html | References the rebuilt bundle. |
| internal/web/dist/assets/index-D1LQiLkx.js | Includes browser refresh changes. |
| internal/web/control_commands.go | Uses fresh reads for refresh and preparation. |
| internal/web/control_commands_test.go | Tests fresh-read routing. |
| internal/ui/monitor_suggestions.go | Opens cached suggestions immediately. |
| internal/ui/monitor_commands.go | Adds cached navigation and forced refresh. |
| internal/ui/monitor_commands_inline.go | Bypasses cache on inline refresh. |
| internal/ui/monitor_command_cache_test.go | Tests cached navigation and local commands. |
| internal/codex/session_commands.go | Exposes shared cache access. |
| internal/codex/session_commands_unix.go | Scopes menus and collects discovered submenus. |
| internal/codex/session_commands_unix_test.go | Tests submenu retention and write validation. |
| internal/codex/session_command_cache.go | Implements bounded caching and background warming. |
| internal/codex/session_command_cache_test.go | Tests cache lifecycle and isolation. |
| internal/codex/live_usage.go | Holds the shared cache. |
| internal/codex/daemon_status_unix.go | Tracks connection generations. |
| internal/codex/client.go | Starts warming from telemetry discovery. |
| go.mod | Makes singleflight dependency direct. |
Review effort: Balanced
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.

Typing
/previously waited for several app-server catalogue queries, and returning to a submenu fetched it again. This adds a shared, memory-only catalogue tree so connected sessions can be discovered in the background and previously fetched menus open immediately.Faster browsing
x/sync/singleflightdependency and let each caller cancel independently.Freshness and actions
Validation
go vetand formatting checks.