feat(#49): better project picker — recents + server projects in New Session modal#52
Open
dzianisv wants to merge 1 commit into
Open
feat(#49): better project picker — recents + server projects in New Session modal#52dzianisv wants to merge 1 commit into
dzianisv wants to merge 1 commit into
Conversation
- New Session modal now shows: - Current project as tappable row (tap to create session immediately) - Recent Projects section: list of previously used dirs as tappable rows - Server Projects section: projects known to opencode server (from /project API) - Manual path input as fallback (unchanged behavior) - Modal body is now scrollable to handle long lists - All selection paths call addRecentDirectory to keep recents up to date - TypeScript clean (pre-existing VariantPicker.tsx error unrelated)
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.
Summary
Closes #49
Problem
The "New Session" modal (triggered by long-pressing the FAB) only showed a blank text input for entering a project path. Users had no visibility into previously used or server-known projects, forcing them to type paths from memory.
Solution
The modal body is now a scrollable list with four sections:
recentDirectoriesstore, max 10). Tapping any row creates the session in that directory immediately.GET /projectwhen the modal opens; shows other projects the server knows aboutAll selection paths continue to call
addRecentDirectoryso the recents list stays up to date.Files Changed
app/(tabs)/index.tsx— addedScrollView,useEffect,Projectimport;serverProjectsstate; replacedmodalBodywith scrollable section layout; added project row stylesTypeScript
Clean (pre-existing
VariantPicker.tsxerror unrelated to this PR)