Conversation
nonhana
commented
Apr 19, 2026
- Api item details will be reused
- Fixed some UI issues
Team worktree integration accidentally staged node_modules symlinks from worker checkpoints. Remove those repository entries so dependency directories remain ignored runtime artifacts rather than tracked source files.\n\nConstraint: node_modules/ is already ignored and must not be versioned\nRejected: Keep worktree symlinks in git | creates self-referential dependency paths in the leader checkout\nConfidence: high\nScope-risk: narrow\nTested: pnpm install --frozen-lockfile restored local dependencies\nNot-tested: none
Mutation handlers now clear the affected Workbench read-resource entries immediately after API saves, version state changes, and API deletion so later cached reads do not serve stale details, version lists, version details, or comparisons. Constraint: Invalidation must work with the new memory-only resource cache and without changing API contracts Rejected: Rely on follow-up refresh calls alone | cached get calls could return stale data after worker-2 wires components through the resource store Confidence: high Scope-risk: narrow Tested: lsp_diagnostics useApiEditorStore.ts, useApiTreeStore.ts, VersionHistory.vue Tested: pnpm --filter @apiplayer/frontend lint Tested: pnpm --filter @apiplayer/frontend build
The quick version panel used the same version list endpoint as the full History view, so leaving it on direct API access would preserve another duplicate-request path if the panel is mounted later. Reuse the Workbench resource store so all version-list consumers share in-flight dedupe and invalidation.\n\nConstraint: No new dependencies; keep caching centralized in the new Pinia store\nRejected: Leave unused component untouched | future use would reintroduce the repeated History-list request path\nConfidence: high\nScope-risk: narrow\nTested: Not yet; pending full frontend lint/build after team completion\nNot-tested: Browser network panel manual flow
Publishing a version can change more than the target version's status, and the quick panel shares the same version-list resource as History. Broaden publish invalidation to the API's version-detail cache, guard quick-panel async writes by resource key, and expose currentVersionId from API detail so current-version UI state is backed by the response contract. Constraint: No new dependencies; keep read caching centralized in useWorkbenchResourceStore Rejected: Invalidate only the published version detail | the previous current version is archived during publish and could otherwise retain stale detail status Confidence: high Scope-risk: narrow Tested: pnpm --filter @apiplayer/frontend lint Tested: pnpm --filter @apiplayer/frontend build Tested: pnpm --filter @apiplayer/backend lint Tested: pnpm --filter @apiplayer/backend typecheck Tested: pnpm --filter @apiplayer/backend build Tested: lsp_diagnostics VersionHistory.vue, VersionQuickPanel.vue, api.dto.ts Not-tested: Browser DevTools Network manual switching scenarios
✅ Deploy Preview for apiplayer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds a frontend “workbench resource” caching layer so API details / version resources can be reused across workbench views, and aligns the backend API detail DTO with the frontend’s currentVersionId usage.
Changes:
- Introduced a Pinia-based resource cache with de-duplication/invalidation helpers for API detail and version resources.
- Updated workbench UI components/stores to fetch via the cache and invalidate/reset cached data on mutations and project switches.
- Exposed
currentVersionIdin the backendApiDetailDtoand applied a couple of small UI tweaks (.gitignore, tooltip placement, layout widths).
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| apps/frontend/src/stores/useWorkbenchResourceStore.ts | New centralized cache/inflight coordination + invalidation API for workbench resources |
| apps/frontend/src/stores/useApiTreeStore.ts | Invalidate cached API resources after deleting an API |
| apps/frontend/src/stores/useApiEditorStore.ts | Invalidate cached API resources after updating an API; minor safety refactor using captured apiId |
| apps/frontend/src/layouts/WorkbenchLayout.vue | Reset workbench cache on project change and on unmount |
| apps/frontend/src/components/workbench/version/VersionQuickPanel.vue | Use cached version list and add request-key guards for async races |
| apps/frontend/src/components/workbench/version/VersionHistory.vue | Use cached version list, add force-refresh support, and invalidate caches on publish/archive/rollback |
| apps/frontend/src/components/workbench/version/VersionDetailSheet.vue | Fetch version detail via cache and add async race guards |
| apps/frontend/src/components/workbench/version/VersionCompareSheet.vue | Fetch comparison via cache and add async race guards |
| apps/frontend/src/components/workbench/api-editor/ApiEditor.vue | Fetch API detail via cache, add force refresh, and adjust tab content layout widths |
| apps/frontend/src/components/workbench/WorkbenchSidebar.vue | Tooltip placement tweak |
| apps/backend/src/api/dto/api.dto.ts | Add currentVersionId to ApiDetailDto response |
| .gitignore | Ignore .omx/ directory |
| if (!options.force) { | ||
| bucket.inflight.set(key, request) | ||
| } |
There was a problem hiding this comment.
getResource starts a new request when options.force is true, but it does not update/replace bucket.inflight. If a previous non-force request is still in-flight, subsequent non-force callers will keep receiving the older in-flight promise (stale result) instead of the forced refresh. Consider replacing any existing inflight entry when forcing (or always storing the latest request in inflight) so all callers can await the most recent fetch and avoid serving stale data during a refresh.
| if (!options.force) { | |
| bucket.inflight.set(key, request) | |
| } | |
| bucket.inflight.set(key, request) |