Skip to content

feat(ui): add plan editor types, approval queue foundation, and REST endpoints#39

Open
AkshatRaj00 wants to merge 6 commits into
hoangsonww:masterfrom
AkshatRaj00:feat/plan-editor-approval-queue
Open

feat(ui): add plan editor types, approval queue foundation, and REST endpoints#39
AkshatRaj00 wants to merge 6 commits into
hoangsonww:masterfrom
AkshatRaj00:feat/plan-editor-approval-queue

Conversation

@AkshatRaj00
Copy link
Copy Markdown
Collaborator

@AkshatRaj00 AkshatRaj00 commented May 17, 2026

This pull request introduces a complete MVP implementation of an approval queue system for plan review, including its core logic, REST API endpoints, and unit tests. The new system allows generated plans to be held for user approval, rejection, or revision before execution, and exposes endpoints for UI integration. The implementation is fully in-memory for simplicity and MVP purposes.

The most important changes are:

Approval Queue Core Logic

  • Added src/core/plan-approval.ts, implementing an in-memory approval queue manager with functions to enqueue plans, list and retrieve entries, apply step edits, record reviewer decisions (approve/reject/request revision), and dequeue entries. Defines all relevant types for queue entries, step updates, and approval actions.

REST API Endpoints

  • Added src/ui/plan-editor-routes.ts, providing Express route handlers for listing the approval queue, retrieving an entry, patching plan steps, and posting approval decisions. All endpoints return a consistent response format and include validation.

Unit Testing

  • Added test/plan-approval.test.ts with comprehensive unit tests covering enqueueing, listing, editing, decision recording, and dequeueing of approval queue entries, ensuring correctness of the queue manager logic.

…endpoint stubs (hoangsonww#8)

- Add PlanEditRequest, PlanApprovalAction, ApprovalQueueEntry types to src/types/index.ts
- Add src/core/plan-approval.ts: approval queue manager with enqueue/dequeue/update
- Add REST endpoint stubs in src/ui/plan-editor-routes.ts for GET/PATCH/POST plan approval
- Closes hoangsonww#8 (partial — MVP foundation for interactive plan editor dashboard flow)"
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an in-memory approval queue system for plan management, featuring a core manager, REST API endpoints, and comprehensive unit tests. The implementation supports enqueuing plans, editing pending steps, and recording reviewer decisions. Feedback focused on improving efficiency by moving static constants outside of function scopes to avoid redundant allocations and enhancing state integrity by restricting decision recording to entries currently in a 'pending' state.

Comment thread src/core/plan-approval.ts Outdated
Comment thread src/core/plan-approval.ts Outdated
Comment thread src/ui/plan-editor-routes.ts Outdated
@hoangsonww
Copy link
Copy Markdown
Owner

pls ensure CI passes

@hoangsonww hoangsonww changed the title feat(ui): add plan editor types, approval queue foundation, and REST … feat(ui): add plan editor types, approval queue foundation, and REST endpoints May 20, 2026
@hoangsonww hoangsonww added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers question Further information is requested feature Feature request labels May 20, 2026
@hoangsonww
Copy link
Copy Markdown
Owner

btw if you can include a demo/screenshot of how this works that'd be great. ty!

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

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request feature Feature request good first issue Good for newcomers question Further information is requested

Development

Successfully merging this pull request may close these issues.

2 participants