Skip to content

feat(app): add recent projects section to open project modal#12886

Closed
pablopunk wants to merge 16 commits intoanomalyco:devfrom
pablopunk:recent-projects-web-ui
Closed

feat(app): add recent projects section to open project modal#12886
pablopunk wants to merge 16 commits intoanomalyco:devfrom
pablopunk:recent-projects-web-ui

Conversation

@pablopunk
Copy link
Contributor

@pablopunk pablopunk commented Feb 10, 2026

What does this PR do?

Recently I switched to coding on the go and the opencode web UI is the perfect candidate to do so. But I found it annoying that when I opened a project, suddenly it was pretty difficult to find recent projects from my phone. Clicking the "+" icon just shows your whole file tree and it's a bit annoying to search for your project on the phone, while the UI knows exactly which recent projects you worked on.

So, whenever you press cmd+o or click Open Project, we could show the same "Recent Projects" we show on the home page (which is not reachable anymore, unless you close all projects).

How did you verify your code works?

Screenshot
Before CleanShot 2026-02-10 at 00 10 38@2x
After CleanShot 2026-02-10 at 00 10 40@2x

- Display top 10 most recently accessed projects in the Cmd+O modal
- Fetch projects from GET /project API endpoint, sorted by time.updated
- Filter out root directory (/) project which is not useful
- Recent projects section only shows when projects exist
- Clicking a recent project opens it directly, same as file browser
- Improve UI with proper spacing and no divider
- Improves discoverability of previously worked projects in web UI
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@pablopunk pablopunk force-pushed the recent-projects-web-ui branch 8 times, most recently from 50fc719 to 5247b21 Compare February 11, 2026 20:39
@pablopunk pablopunk force-pushed the recent-projects-web-ui branch from 5247b21 to 161789e Compare February 11, 2026 20:41
- Create reusable PathDisplay component for consistent path rendering
- Extract formatProjectPath helper for path formatting logic
- Extract RecentProjectItem component to reduce JSX complexity
- Use single isRoot boolean instead of repeated conditions
- Apply same path display logic to both recent projects and search results
return sync.data.project
.slice()
.sort((a, b) => (b.time.updated ?? b.time.created) - (a.time.updated ?? a.time.created))
.toSorted((a, b) => (b.time.updated ?? b.time.created) - (a.time.updated ?? a.time.created))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently toSorted does not mutate the original array so we don't need to slice

@pablopunk
Copy link
Contributor Author

Closing because I'm not cool enough I guess #15270

@pablopunk pablopunk closed this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant