Files
hermes-krates-connector/design/collection_window.md
2026-06-16 08:31:55 -04:00

45 lines
1.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Collection Window Feature
**Purpose**: Provide an overview list or tree of objects within a namespace or category (e.g., "All Pods", "ns/payments").
**Size**: Default 540×480px.
**Header**:
- Title (e.g., "pods · ns/payments") with status summary badges (✓N/N/N).
- Filter input (autofocused on open) using `IBM Plex Mono` at 12px.
- Keyboard hint (`↑↓ ⌥L/S/D/Y`).
- Buttons to toggle **List** vs **Tree** view.
**List Mode**:
- Row shows shape glyph, name, relation tag (muted), health metric, type badge, view shortcuts (⌥L/S/D/Y), status dot.
- Selected row: `background: accentDim; border-left: 2px solid accent`.
- Hover row: `background: rgba(255,255,255,.04)`.
- Sorting: degraded/failed first, then pending, then ready; alphabetical within groups.
**Tree Mode**:
- Hierarchical view similar to k9s "xray".
- Workloads expand to show their pods; pods expand to show ConfigMaps, Secrets, PVCs.
- Services/Ingresses expand to show targets.
- Relation tags: `pod`, `configMap`, `secret`, `volume`, `selects`, `routes`, `used by`.
- Indentation `20px×depth` with Lshaped connector border.
- Filtering retains matching nodes **and** all ancestors so hierarchy stays readable.
**Interaction**:
- Typing filters instantly (no mode switch).
- `↑/↓` moves selection highlight.
- `⌥L/S/D/Y` opens the respective view for the selected row (same shortcuts as Spotlight).
- `Enter` opens the default view for the selected row.
- `Escape` blurs the filter input.
- Mouseover the collection window and start typing focuses the filter input.
- Resizing follows the same rules as other Detail Windows (sibling windows resize proportionally).
**State** (`CollectionState` interface in design docs):
```typescript
interface CollectionState {
[wid: string]: {
search: string;
view: 'list' | 'tree';
sel: number; // selected row index
}
}
```