feat: show recently-opened projects first in picker dropdown#15
Merged
Lexus2016 merged 2 commits intoMay 30, 2026
Merged
Conversation
The project picker dropdown listed projects in fixed insertion/drag order with no notion of recency, so the project you just worked in could be buried. - Track project opens client-side in localStorage (cc_proj_recents) - Render a "Recent" section (top N) above a divider and the full list in the header dropdown only; sidebar manual drag-order is left untouched - N comes from a `recentProjectsCount` key in the config (default 5), merged in loadMergedConfig() and editable via the existing config editor; the server-side `?? 5` fallback guarantees the default when unset - Search/filter keeps the previous flat behavior; no Recent section until a project has been opened - i18n labels added for en/uk/ru Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Kanban page (public/kanban.html) has its own copy of the project picker, so the recents-first change to the chat header dropdown didn't appear there. - Add the same Recent section (top N + divider) to the Kanban picker - Reuse the shared localStorage store (cc_proj_recents), keyed by project id, so recency is shared between the chat page and the Kanban page - Record an open when a project is picked in the Kanban dropdown - Fetch /api/config in loadProjects() to read recentProjectsCount (default 5 via the existing server fallback) - Add proj.recent i18n label + section-label/divider CSS for en/uk/ru Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lexus2016
approved these changes
May 30, 2026
Owner
Lexus2016
left a comment
There was a problem hiding this comment.
Thank you for this contribution, @apperside! 🙏
Reviewed and approved. The implementation is clean and well-scoped:
- All user-facing strings are properly escaped via
escH— no new XSS surface. localStorageaccess is guarded withtry/catch, and recents are filtered against known project ids at render time (no stale/undefined entries).- The server-side
?? 5default plus the0-to-hide escape hatch is a nice touch. - Respects the project's no-build / single-file / vanilla-JS philosophy — no new dependencies, no schema or WebSocket changes.
node --checkand inline-script parsing pass on the head ref.
Merging now. We're also extending the same Recent UX to the Scheduler view, so the project picker behaves consistently across Chat, Kanban, and Scheduler. It will ship in the next release. Thanks again! 🚀
Lexus2016
added a commit
that referenced
this pull request
May 30, 2026
Mirrors the Chat/Kanban 'Recent' dropdown from #15 into schedule.html: - recents tracking via the shared cc_proj_recents localStorage key (keyed by project id) - configurable recentProjectsCount (default 5, 0 hides the section), loaded from /api/config - 'Recent' section label + divider CSS, i18n labels for uk/en/ru - shared _projItemHTML helper; search keeps the previous flat behavior
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.
What
Adds a Recent section to the top of the header project-picker dropdown, showing the most-recently-opened projects first.
Why
The dropdown listed projects in fixed insertion/drag order with no notion of recency, so the project you just worked in could be buried in a long list.
How
localStorage(cc_proj_recents, a{ projectId: timestamp }map), updated inswitchProject()so every entry point (dropdown, sidebar, deep link) counts.recentProjectsCountconfig key (default 5), merged throughloadMergedConfig()and editable via the existing config editor (which writesdata/config.json). The server-side?? 5fallback guarantees the default when unset; set it to0to hide the section.proj.recent/proj.alllabels added for en/uk/ru.Files
server.js— exposerecentProjectsCount(with?? 5default) inloadMergedConfig()public/index.html— recency helpers,switchProjecthook, dropdown rendering + shared item helper, CSS, i18nVerification
node --check server.jsand an inline-script parse check pass.0.public/index.htmlstays a single file.🤖 Generated with Claude Code