Repository navigation
docs: add AI Work Panel feasibility study and architectural roadmap (#274) - #280
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The document contains an incorrect Monaco API recommendation and an unresolved stale-document safety gap.
Review effort: Lite
Findings: 1
Open (4)
What changed in this PR
Adds a feasibility study and architectural roadmap for a future AI Work Panel.
Changes:
- Documents single-document editing, undo handling, and backend integration.
- Describes future project-wide AI workflows.
- Adds the study to MkDocs navigation.
| File | Summary |
|---|---|
mkdocs.yml |
Registers the feasibility study in documentation navigation. |
docs/AIWorkPanelFeasibilityStudy.md |
Documents the proposed Work Panel architecture, UX, editing workflow, and roadmap. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| 3. **Diff & Review Experience:** | ||
| - Provide an optional side-by-side or inline diff preview before applying destructive changes. | ||
| - Users can choose between **"Apply Directly"** (with instant undo) and **"Review Diff"**. |
|
|
||
| 1. **Preserving Monaco Undo/Redo History:** | ||
| - Replacing the entire document via `editor.setValue()` destroys Monaco's undo stack, causing frustration if the user wants to revert. | ||
| - **Recommended Approach:** Use `monaco.executeEdits("ai-work", [{ range: fullRange, text: newContent }])` and push an undo stop via `model.pushStackElement()`. This ensures that pressing `Ctrl+Z` / `Cmd+Z` restores the exact pre-AI state. |
| @@ -0,0 +1,96 @@ | |||
| # Feasibility Study: AI Work Panel and Future Project Direction | |||
|
|
|||
| > **Issue Reference:** Closes [#274](https://github.com/petertzy/markdown-reader/issues/274) | |||
| | **Output Type** | Conversational prose and markdown snippets | Direct document edits / diffs | | ||
| | **Context Scope** | Prompt + selected snippet | Full active document + selection + metadata | | ||
| | **User Interaction** | Read and manually copy/paste snippets | Review changes and accept/revert with one click | | ||
| | **Editor Integration** | Passive | Active (`executeEdits` with undo-stack preservation) | |
- update Monaco API reference to editor.executeEdits on mounted instance - add stale-document concurrency guard protocol using baseDocHash - remove misleading Closes directive from issue reference metadata - accurately distinguish existing AI Chat proposal flow from Work Panel
|
This PR updates the feasibility study to accurately describe the existing AI Chat proposal flow, clarify Monaco undo behavior as an implementation detail requiring validation, and require stale document checks both when results return and immediately before applying them. It also replaces overly definitive safety and feasibility claims with a recommendation to validate them in a Phase 1 prototype. Frontend tests pass (8/8), and |



Summary
Addresses #274
Adds an architectural feasibility study and technical roadmap document (
docs/AIWorkPanelFeasibilityStudy.md) detailing the system design, user interaction flow, and backend protocol for introducing an AI Work Panel capable of direct document modification.Key Sections Covered
monaco.executeEditsto preserve the complete undo/redo stack (Ctrl+Z).mkdocs.ymlnavigation for project documentation.