Split the bar panel into one QML file per stage
Panel.qml keeps the state, the CLI calls and the stage switch (889 lines, was 2360); each stage is its own file taking the panel as a required property. The omarchy installer copies every QML/JS file and clears stale ones. tests/static.sh filters qmllint on [syntax], not the word error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+27
-1
@@ -174,4 +174,30 @@ test.
|
||||
| session repair | `linux/lib/repair.sh`; `cm-json.py` `cmd_scan_sessions`, `cmd_repair_session` | — |
|
||||
| key storage | `linux/cm-vault.sh` | `lib/vault.ps1` |
|
||||
| the bar icon and state | `omarchy/smoido.claude-mode/BarWidget.qml` | — |
|
||||
| the panel | `omarchy/smoido.claude-mode/Panel.qml` | — |
|
||||
| what the panel does | `Panel.qml` (state, actions, the processes it runs) | — |
|
||||
| how one panel stage looks | its own file, below | — |
|
||||
|
||||
### The bar widget's files
|
||||
|
||||
All in `omarchy/smoido.claude-mode/`. The panel owns every piece of state and
|
||||
every action; each stage file only draws, from the `panel` it is handed.
|
||||
|
||||
| file | what is in it |
|
||||
|---|---|
|
||||
| `BarWidget.qml` | the icon, the state it watches (`health.json`, `state.json`, the model cache), the session scan, the provider lookup |
|
||||
| `Panel.qml` | the panel's state and actions, the CLI processes they run, the hero and the footer, and the stages in stacking order |
|
||||
| `ModeList.qml` | the modes to switch to, each unfolding its presets |
|
||||
| `BlockedStage.qml` | a refused switch, with the fix |
|
||||
| `ServerStage.qml` | a server provider's address and key |
|
||||
| `PresetStage.qml` | the preset editor |
|
||||
| `TierStage.qml` | picking one tier's model |
|
||||
| `NewPresetStage.qml`, `RenameStage.qml`, `DeleteStage.qml` | a preset's lifecycle |
|
||||
| `SessionsStage.qml` | the running-sessions question before a switch |
|
||||
| `BrokenSessions.qml`, `RepairStage.qml` | sessions a switch broke, and repairing one |
|
||||
| `ModelMap.qml` | the active tier-to-model map |
|
||||
| `PillButton.qml`, `BrandIcon.qml` | the panel's button, and a provider's mark |
|
||||
| `Modes.js` | fallback presentation for anthropic and an older `health.json` |
|
||||
|
||||
A stage cannot reach into another file by id, so where an action has to touch a
|
||||
stage's field — clearing the model search, focusing a name field — `Panel.qml`
|
||||
emits a signal and the stage's `Connections` block does it.
|
||||
|
||||
Reference in New Issue
Block a user