adjustments + new tracks + tasks.md reduction of usage

This commit is contained in:
2026-03-08 03:31:15 -04:00
parent 2ffb2b2e1f
commit 7bdba1c9b9
22 changed files with 472 additions and 632 deletions

View File

@@ -0,0 +1,15 @@
{
"track_id": "gui_path_config_20260308",
"title": "GUI Path Configuration in Context Hub",
"status": "pending",
"created": "2026-03-08",
"priority": "high",
"owner": "tier2-tech-lead",
"description": "Add path configuration UI to Context Hub. Allow users to view and edit configurable paths (conductor, logs, scripts) directly from the GUI.",
"dependencies": ["conductor_path_configurable_20260306"],
"out_of_scope": [
"Per-project path configuration",
"Runtime path switching without restart",
"Path validation"
]
}

View File

@@ -0,0 +1,88 @@
# Plan: GUI Path Configuration in Context Hub
## Phase 1: Path Info Display
Focus: Show current path resolution in GUI
- [ ] Task 1.1: Add path info functions to paths.py
- WHERE: src/paths.py
- WHAT: Add functions to get path resolution source (default/env/config)
- HOW: Return tuple of (resolved_path, source)
- SAFETY: New functions, no modifications
- [ ] Task 1.2: Create path display helper
- WHERE: src/paths.py
- WHAT: Function to get all paths with resolution info
- HOW: Returns dict of path_name -> (resolved, source)
- SAFETY: New function
## Phase 2: Context Hub Panel
Focus: Add Path Configuration panel to GUI
- [ ] Task 2.1: Add Paths tab to Context Hub
- WHERE: src/gui_2.py (Context Hub section)
- WHAT: New tab/section for path configuration
- HOW: Add ImGui tab item, follow existing panel patterns
- SAFETY: New panel, no modifications to existing
- [ ] Task 2.2: Display current paths
- WHERE: src/gui_2.py (new paths panel)
- WHAT: Show resolved paths and their sources
- HOW: Call paths.py functions, display in read-only text
- SAFETY: New code
- [ ] Task 2.3: Add path text inputs
- WHERE: src/gui_2.py (paths panel)
- WHAT: Editable text inputs for each path
- HOW: ImGui input_text for conductor_dir, logs_dir, scripts_dir
- SAFETY: New code
- [ ] Task 2.4: Add browse buttons
- WHERE: src/gui_2.py (paths panel)
- WHAT: File dialog buttons to browse for directories
- HOW: Use existing file dialog patterns in gui_2.py
- SAFETY: New code
## Phase 3: Persistence
Focus: Save path changes to config.toml
- [ ] Task 3.1: Add config write function
- WHERE: src/gui_2.py or new utility
- WHAT: Write [paths] section to config.toml
- HOW: Read existing config, update paths section, write back
- SAFETY: Backup before write, handle errors
- [ ] Task 3.2: Add Apply button
- WHERE: src/gui_2.py (paths panel)
- WHAT: Button to save changes
- HOW: Call config write function, show success/error message
- SAFETY: Confirmation dialog
- [ ] Task 3.3: Add Reset button
- WHERE: src/gui_2.py (paths panel)
- WHAT: Reset paths to defaults
- HOW: Clear custom values, show confirmation
- SAFETY: Confirmation dialog
## Phase 4: UX Polish
Focus: Improve user experience
- [ ] Task 4.1: Add restart warning
- WHERE: src/gui_2.py (paths panel)
- WHAT: Show warning that changes require restart
- HOW: Text label after Apply
- SAFETY: New code
- [ ] Task 4.2: Add tooltips
- WHERE: src/gui_2.py (paths panel)
- WHAT: Explain each path and resolution order
- HOW: ImGui set_tooltip on hover
- SAFETY: New code
## Phase 5: Tests
Focus: Verify GUI path configuration
- [ ] Task 5.1: Test path display
- WHERE: tests/test_gui_paths.py (new file)
- WHAT: Verify paths panel shows correct values
- HOW: Mock paths.py, verify display
- SAFETY: New test file

View File

@@ -0,0 +1,72 @@
# Track Specification: GUI Path Configuration in Context Hub
## Overview
Add path configuration UI to the Context Hub in the GUI. Allow users to view and edit configurable paths (conductor, logs, scripts) directly from the application without manually editing config.toml or environment variables.
## Current State Audit
### Already Implemented
- `src/paths.py`: Path resolution with env var and config.toml support
- `config.toml [paths]` section: Global path configuration
- Context Hub panel in GUI (`gui_2.py`)
### Gaps to Fill
- No GUI to view/edit paths
- Users must edit config.toml manually
- No visibility into current path resolution
## Goals
1. Add Path Configuration panel to Context Hub
2. Display current resolved paths (read-only)
3. Allow editing paths via text inputs
4. Persist changes to config.toml
5. Show path resolution source (default/env/config)
## Functional Requirements
### UI Panel Location
- Context Hub → "Paths" tab/section
### UI Elements
| Element | Type | Description |
|---------|------|-------------|
| Conductor Dir | Text input + browse button | Path to conductor directory |
| Logs Dir | Text input + browse button | Path to logs directory |
| Scripts Dir | Text input + browse button | Path to scripts directory |
| Resolution Info | Label | Shows source: "default" / "env:SLOP_*" / "config.toml" |
| Apply Button | Button | Save changes to config.toml |
| Reset Button | Button | Reset to defaults |
### Path Resolution Display
Show how each path is resolved:
```
Conductor: /path/to/custom (config.toml)
Logs: ./logs/sessions (default)
Scripts: /env/path (env: SLOP_SCRIPTS_DIR)
```
### Persistence
- Changes written to `config.toml [paths]` section
- App restart required for changes to take effect (show warning)
- Backup existing config.toml before writing
## Architecture Reference
- **Paths module**: `src/paths.py` - path resolution functions
- **Context Hub**: `gui_2.py` - existing Context Hub panel
- **Config I/O**: `project_manager.py` - TOML read/write utilities
- **Config location**: `paths.get_config_path()` - config file location
## Out of Scope
- Per-project path configuration (separate track)
- Runtime path switching without restart
- Path validation/creation
## Non-Functional Requirements
- Follow existing GUI code style (ImGui/Dear PyGui patterns)
- Show confirmation dialog before writing config
- Display current resolved paths on panel open
- Handle missing config.toml gracefully (create new section)

View File

@@ -0,0 +1,15 @@
{
"track_id": "project_conductor_dir_20260308",
"title": "Project-Specific Conductor Directory",
"status": "pending",
"created": "2026-03-08",
"priority": "high",
"owner": "tier2-tech-lead",
"description": "Make conductor directory per-project. Each project TOML can specify custom conductor dir for isolated track/state management.",
"dependencies": ["conductor_path_configurable_20260306"],
"out_of_scope": [
"GUI path configuration",
"Runtime path switching",
"Track migration between projects"
]
}

View File

@@ -0,0 +1,58 @@
# Plan: Project-Specific Conductor Directory
## Phase 1: Extend paths.py
Focus: Add project-specific path resolution
- [ ] Task 1.1: Add project-aware conductor path functions
- WHERE: src/paths.py
- WHAT: Add optional project_path parameter to get_conductor_dir, get_tracks_dir, get_track_state_dir
- HOW: If project_path provided, resolve relative to project root; otherwise use global
- SAFETY: Maintain backward compatibility with no-arg calls
- [ ] Task 1.2: Add project conductor path resolution
- WHERE: src/paths.py
- WHAT: New function `_resolve_project_conductor_dir(project_path)` that reads from project TOML
- HOW: Load project TOML, check `[conductor].dir` key
- SAFETY: New function, no side effects
## Phase 2: Update project_manager.py
Focus: Use project-specific paths for track operations
- [ ] Task 2.1: Update save_track_state to use project conductor dir
- WHERE: src/project_manager.py (around line 240)
- WHAT: Pass project base_dir to paths.get_track_state_dir()
- HOW: Get base_dir from project_path, call paths with project_path param
- SAFETY: Maintain existing function signature compatibility
- [ ] Task 2.2: Update load_track_state to use project conductor dir
- WHERE: src/project_manager.py (around line 252)
- WHAT: Load track state from project-specific directory
- HOW: Same as above
- [ ] Task 2.3: Update get_all_tracks to use project conductor dir
- WHERE: src/project_manager.py (around line 297)
- WHAT: List tracks from project-specific directory
- HOW: Accept optional project_path param
## Phase 3: Update app_controller.py
Focus: Pass project path to track operations
- [ ] Task 3.1: Update track creation to use project conductor dir
- WHERE: src/app_controller.py (around line 1907, 1937)
- WHAT: Pass active_project_path to track path functions
- HOW: Get active_project_path, pass to paths.get_tracks_dir()
- SAFETY: Use existing active_project_path attribute
## Phase 4: Tests
Focus: Verify project-specific behavior
- [ ] Task 4.1: Write test for project-specific conductor dir
- WHERE: tests/test_project_paths.py (new file)
- WHAT: Create mock project with custom conductor dir, verify tracks saved there
- HOW: Mock project_manager, verify path resolution
- SAFETY: New test file
- [ ] Task 4.2: Test backward compatibility
- WHERE: tests/test_project_paths.py
- WHAT: Verify global paths still work without project_path
- HOW: Call functions without project_path, verify defaults

View File

@@ -0,0 +1,73 @@
# Track Specification: Project-Specific Conductor Directory
## Overview
Make the conductor directory per-project instead of global. Each project TOML can specify its own `conductor_dir` path, allowing separate track/state management per project. This enables using Manual Slop with multiple independent projects without track/ticket cross-pollution.
## Current State Audit
### Already Implemented
- `src/paths.py`: Global path resolution via env vars and config.toml
- `paths.get_conductor_dir()`: Returns global conductor directory
- `config.toml [paths]` section: Global path overrides
### Gaps to Fill
- No per-project conductor directory support
- Tracks are always loaded from global conductor dir
- No way to isolate tracks between projects
## Goals
1. Allow projects to specify custom conductor directory in their TOML
2. Load track state from project-specific conductor dir
3. Create new tracks in project-specific directory
4. Maintain backward compatibility with global conductor
## Functional Requirements
### Per-Project Conductor Path
| Project TOML Key | Description | Default |
|-----------------|-------------|---------|
| `conductor.dir` | Path to conductor directory | `"conductor"` (relative to project root) |
### Example Project TOML
```toml
[project]
name = "MyCProject"
path = "/path/to/my-c-project"
[conductor]
# This project's tracks will be in /path/to/my-c-project/my_tracks/
dir = "my_tracks"
```
### Path Resolution Order
1. Project TOML `[conductor].dir` (project-specific)
2. Environment variable `SLOP_CONDUCTOR_DIR` (global override)
3. Config.toml `[paths].conductor_dir` (global default)
4. Fallback to `"conductor"`
### API Changes
- `paths.get_conductor_dir(project_path: str = None) -> Path`: Add optional project_path param
- `paths.get_tracks_dir(project_path: str = None) -> Path`: Returns project-specific tracks dir
- `paths.get_track_state_dir(track_id: str, project_path: str = None) -> Path`
### Integration Points
- `project_manager.py`: Pass project_path to path functions when saving/loading tracks
- `app_controller.py`: Use active project's conductor dir for track operations
## Architecture Reference
- **Existing paths.py**: `src/paths.py` - current global path resolution
- **Project loading**: `project_manager.py:load_project()` - loads project TOML
- **Active project**: `app_controller.py:active_project_path` - current project
## Out of Scope
- GUI path configuration (separate track)
- Runtime path switching (paths resolved at project load)
- Migrating existing tracks between projects
## Relationship to Track 0
This extends conductor_path_configurable_20260306:
- Track 0: Global path configuration (done/impro track: Per-projectved)
- This path override