feat(app-builder): recent apps persistence and HTTP API#27
feat(app-builder): recent apps persistence and HTTP API#27ericzakariasson wants to merge 1 commit intomainfrom
Conversation
Introduce filesystem-backed storage under ~/.app-builder, shared model validation/sorting, request parsing helpers, and Next.js route handlers for listing, upserting, patching, and deleting recent apps. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high mode and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 666106e. Configure here.
|
|
||
| function isNodeFileError(error: unknown): error is NodeJS.ErrnoException { | ||
| return error instanceof Error && "code" in error | ||
| } |
There was a problem hiding this comment.
Duplicated utility function and constant from sibling module
Low Severity · Code Quality
The private isNodeFileError function is an exact duplicate of the one in server.ts (line 534) in the same lib/app-builder/ directory. Similarly, the appBuilderRoot constant on line 16 is identical to server.ts line 129. Both files also share the same writeFile-with-chmod pattern. Extracting the shared helper and constant into a small common module would avoid the duplication and keep them in sync.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 666106e. Configure here.


Summary
Adds filesystem-backed recent-apps storage (
~/.app-builder/recent-apps.json), shared types/sanitization, request parsing, and App Router handlers for GET/POST/api/recent-appsand PATCH/DELETE/api/recent-apps/[id].Notes
Made with Cursor
Note
Medium Risk
Introduces new server-side HTTP endpoints plus filesystem-backed persistence under the user home directory, which can affect data integrity and runtime behavior on deployed environments. Risk is moderate due to new file I/O and request validation paths, though scope is limited to the app-builder recent-apps feature.
Overview
Adds a new filesystem-backed "recent apps" store persisted to
~/.app-builder/recent-apps.json, including sharedRecentApptypes, sanitization/normalization, and sorting (favorites first, then most recently updated).Exposes this storage via new Next.js App Router handlers:
GET/POST /api/recent-appsto list and upsert (optionally skipping the "touch" timestamp), andPATCH/DELETE /api/recent-apps/[id]to updatefavorite/titleor remove an entry, with basic request parsing and 400/404 error handling.Reviewed by Cursor Bugbot for commit 666106e. Bugbot is set up for automated code reviews on this repo. Configure here.