2.4 KiB
2.4 KiB
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 supportconfig.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
- Add Path Configuration panel to Context Hub
- Display current resolved paths (read-only)
- Allow editing paths via text inputs
- Persist changes to config.toml
- 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)