Private
Public Access
conductor(archive): move 39 completed tracks (2026-05 to 2026-06) to archive/
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Track context_preservation_and_warnings_20260601 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"track_id": "context_preservation_and_warnings_20260601",
|
||||
"type": "bug",
|
||||
"status": "new",
|
||||
"created_at": "2026-06-01T00:00:00Z",
|
||||
"updated_at": "2026-06-01T00:00:00Z",
|
||||
"description": "Preserve context selection on discussion switch and add empty context warning"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
# Implementation Plan: Context Preservation and Warnings
|
||||
|
||||
## Phase 1: Context Inheritance on Creation
|
||||
- [ ] Task: Update `_create_discussion`
|
||||
- [ ] In `src/app_controller.py`, modify `_create_discussion`. Before switching, capture the current `context_files` (with their current `auto_aggregate` states).
|
||||
- [ ] When initializing the new discussion via `project_manager.default_discussion()`, immediately set its `context_snapshot` to a serialization of the current `context_files`.
|
||||
|
||||
## Phase 2: Empty Context Warning Modal
|
||||
- [ ] Task: Implement Warning Logic in App
|
||||
- [ ] In `src/gui_2.py`, add `self.show_empty_context_modal = False` and `self._pending_generation_action = None` (to store whether 'generate' or 'md_only' was requested) to `App.__init__`.
|
||||
- [ ] In `App._handle_generate_send` and `App._handle_md_only`, check if `self.ui_selected_context_files` is empty.
|
||||
- [ ] If empty, set `self.show_empty_context_modal = True` and store the action type. If not empty, call the respective controller method directly.
|
||||
- [ ] Task: Render Modal
|
||||
- [ ] In `src/gui_2.py`, add a new function `render_empty_context_modal(app: App)`.
|
||||
- [ ] The modal should display a warning and have "Proceed Anyway" (which calls the controller based on `_pending_generation_action`) and "Cancel" buttons.
|
||||
- [ ] Call this new render function inside the main UI loop, likely near where `render_missing_files_modal` is called.
|
||||
|
||||
## Phase 3: Verification
|
||||
- [ ] Task: Manual Verification
|
||||
- [ ] Verify creating a new discussion preserves checked files.
|
||||
- [ ] Verify the warning modal appears when generating with no files, and that "Proceed Anyway" works correctly.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Specification: Context Preservation and Warnings
|
||||
|
||||
## 1. Overview
|
||||
Currently, creating a new discussion drops all currently selected files because the new discussion is initialized without a `context_snapshot`. Additionally, attempting to generate a response without any selected context files provides no user feedback. We need to inherit the current context composition when a new discussion is created and add a warning mechanism for empty contexts.
|
||||
|
||||
## 2. Functional Requirements
|
||||
* **Context Inheritance:** When a new discussion is created via `_create_discussion` in `src/app_controller.py`, the active discussion's `context_files` (or the current `ui_selected_context_files` state) MUST be saved into the new discussion's `context_snapshot`.
|
||||
* **Empty Context Warning:** When `_handle_generate_send` or `_handle_md_only` is triggered in `src/gui_2.py`, it must verify if `ui_selected_context_files` is empty. If empty, it MUST display a warning modal instead of immediately calling the controller.
|
||||
* **Modal Actions:** The warning modal should offer "Proceed Anyway" (which continues the generation) and "Cancel" buttons.
|
||||
|
||||
## 3. Non-Functional Requirements
|
||||
* **Consistency:** The new empty context modal must match the style of existing warnings (like `show_missing_files_modal`).
|
||||
* **ImGui Stability:** Ensure the modal rendering does not violate ImGui stack scoping.
|
||||
|
||||
## 4. Acceptance Criteria
|
||||
* Creating a new discussion with 3 files checked results in the new discussion also having those 3 files checked.
|
||||
* Clicking "Generate Response" with 0 files checked opens a warning modal.
|
||||
* Clicking "Proceed Anyway" successfully generates the response (with 0 files).
|
||||
Reference in New Issue
Block a user