Skip to content

Add Projects refresh control#3993

Open
TheAngryPit wants to merge 2 commits into
nexu-io:mainfrom
TheAngryPit:codex/projects-refresh-control
Open

Add Projects refresh control#3993
TheAngryPit wants to merge 2 commits into
nexu-io:mainfrom
TheAngryPit:codex/projects-refresh-control

Conversation

@TheAngryPit

Copy link
Copy Markdown

Why

While using Open Design as a local-first workspace, the Projects grid can stay stale after project data changes outside the current web view. The current workaround is to restart or manually reload the app, which is too heavy for a desktop design workflow.

This adds a bounded in-app refresh path for the Projects view so users can resync the list without leaving the app.

What users will see

Projects now has a Refresh button next to search.

When the Projects tab is active and the document is visible, the list also refreshes:

  • immediately when the Projects view becomes active
  • when the window regains focus
  • when the document becomes visible again
  • every 15 seconds while active and visible

The refresh button shows the existing spinner state while a refresh is in flight, and repeated refreshes are guarded so the view does not stack concurrent requests.

Surface area

  • UI - adds a Projects toolbar refresh button in apps/web
  • Keyboard shortcut - new or changed
  • CLI / env var - new od subcommand or flag, new tools-dev / tools-pack / tools-pr flag, or new OD_* env var
  • API / contract - extends the existing projects list controls analytics element union with refresh
  • Extension point - new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys - added new translation keys
  • New top-level dependency - adding any new entry to the root package.json
  • Default behavior change - Projects now refreshes automatically while the tab is active and visible
  • None - internal refactor, docs, tests, or translation update only

Screenshots

Not captured in this environment.

Bug fix verification

  • Test path that covers the behavior: apps/web/tests/components/DesignsTab.select-mode.test.tsx
  • Red on main and green on this branch: no. The bug was observed as stale project cards in the desktop app; this PR adds the missing refresh entry point and covers the new behavior with focused component tests.

Validation

  • pnpm exec vitest run -c vitest.config.ts tests/components/DesignsTab.select-mode.test.tsx from apps/web: passed, 9 tests
  • pnpm --filter @open-design/web typecheck: passed
  • pnpm --filter @open-design/contracts typecheck: passed
  • pnpm --filter @open-design/web... build: passed
  • pnpm guard: passed

Notes:

  • The local machine is running Node v26.0.0; the workspace emits the existing engine warning because it wants Node ~24.
  • pnpm guard and the web build had to run outside the Codex sandbox because tsx opens a temporary IPC pipe that the sandbox blocks with listen EPERM.

@lefarcen lefarcen requested a review from mrcfps June 9, 2026 10:35
@lefarcen lefarcen added size/M PR changes 100-300 lines risk/medium Medium risk: regular code changes type/feature New feature labels Jun 9, 2026
@lefarcen lefarcen requested a review from elihahah666 June 9, 2026 10:35
@lefarcen

lefarcen commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Hey @TheAngryPit! 👋 Nice write-up — the layered refresh triggers (visibility, focus, 15 s heartbeat, manual button) are well-reasoned and the PR body walks through exactly what a reviewer needs to scope this quickly.

I've assigned @mrcfps for code review and added @elihahah666 to take a look at the UX side (new toolbar button + the auto-refresh default behavior change). Once they've weighed in we'll move to merge from there.

A couple of things to have handy when review feedback arrives:

  • The onProjectsRefresh pattern has prior art in this repo (closed PR fix(web): refresh projects list on terminal run statuses #1260 wired it into terminal-run paths) — worth a quick pointer in case reviewers ask about consistency.
  • The Node v26 / engine warning note in Validation is helpful context; no action needed.

💡 To drive this PR to merge hands-free, paste this to your AI coding agent (Claude Code / Codex / opencode / Cursor …):
Take over nexu-io/open-design#3993 until it merges — read https://raw.githubusercontent.com/nexu-io/looper/main/skills/pr-takeover/SKILL.md and follow it.

@mrcfps mrcfps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@TheAngryPit Thanks for adding the in-app Projects refresh path — I reviewed the changed ranges and found one merge-safe follow-up around failed refresh handling that’s worth tightening up.

🔁 Powered by Looper · runner=reviewer · agent=opencode · An autonomous AI dev team for your GitHub repos.

Comment thread apps/web/src/components/DesignsTab.tsx

@mrcfps mrcfps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@TheAngryPit I reviewed the changed ranges on this head, including the App → EntryView/EntryShell wiring, the DesignsTab refresh/failure handling, the analytics union update, and the focused component coverage for manual + active-tab refresh behavior. The unhandled rejection follow-up from the prior review is addressed on this head, and the refresh path now looks internally consistent. Thanks for the quick follow-through on this one 🙌

🔁 Powered by Looper · runner=reviewer · agent=opencode · An autonomous AI dev team for your GitHub repos.

@TheAngryPit

Copy link
Copy Markdown
Author

All review feedback has been addressed and the PR is now approved with checks green.

I attempted to add it to the merge queue, but GitHub returned TheAngryPit does not have the correct permissions to execute EnablePullRequestAutoMerge, so this needs a maintainer to queue or merge it from here.

Aegis

@lefarcen

lefarcen commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Hey @TheAngryPit — confirmed, mrcfps's APPROVED review is on the current head and CI is green. 🙌

One remaining gate: @elihahah666 is listed as a reviewer for the product/UX side (new toolbar button + the auto-refresh default). Once she's had a look, a maintainer can queue or merge from there.

@TheAngryPit

Copy link
Copy Markdown
Author

Thanks @lefarcen , makes sense.

@elihahah666, happy to adjust the UX if you want a different treatment for the toolbar entry point or the default refresh behavior. Current intent was to keep the manual control discoverable while bounding the automatic refresh to the active, visible Projects tab so it does not poll in the background.

Pit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/medium Medium risk: regular code changes size/M PR changes 100-300 lines type/feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants