Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6b3703c
feat: add show_all_sessions option, session stability tracking, ci
dbachelder Jan 7, 2026
2e6e8b6
fix: add claude.md
dbachelder Jan 8, 2026
87ed12f
fix: fix wrapping for delete session warning
dbachelder Jan 9, 2026
8bab67f
feat: add quick-switch to previous session
dbachelder Jan 8, 2026
bb189da
docs: initialize ZSM usability milestone
dbachelder Jan 8, 2026
e46504f
feat(01): color palette for session bullets
dbachelder Jan 14, 2026
988e97b
feat(02): MRU session ordering
dbachelder Jan 14, 2026
c8ea11f
feat(03): tabular alignment for session list
dbachelder Jan 14, 2026
7713089
feat(04): set pane title to ZSM
dbachelder Jan 14, 2026
793765d
feat(05): optimistic UI on session deletion
dbachelder Jan 14, 2026
234583e
feat(06): two-row help text layout
dbachelder Jan 14, 2026
3c12082
feat(07): session rename with Alt+r
dbachelder Jan 14, 2026
1df76aa
docs: update CLAUDE.md with recent features
dbachelder Jan 14, 2026
07f4d2c
feat(08): resurrectable session toggle with Alt+D
dbachelder Jan 14, 2026
bbd2618
fix(09): stay on NewSession screen when advancing from name entry
dbachelder Jan 16, 2026
9d3afc7
docs(10): capture phase context
dbachelder Jan 16, 2026
6b7811f
docs(10): create phase plan
dbachelder Jan 16, 2026
3357e13
docs: update roadmap with phase 10 plan
dbachelder Jan 16, 2026
aa82573
feat(10-01): implement two-color help text styling
dbachelder Jan 16, 2026
22c8749
docs(10-01): complete two-color help text styling plan
dbachelder Jan 16, 2026
860acfc
docs(10): complete help-text-phase-2 phase
dbachelder Jan 16, 2026
5bbf44c
fix(10-01): add angle brackets around keys in help text
dbachelder Jan 16, 2026
da6e1b2
feat(10): two-color help text with correct character indexing
dbachelder Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Run tests
run: cargo test --target x86_64-unknown-linux-gnu

build-wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-wasip1

- name: Build WASM plugin
run: cargo build --target wasm32-wasip1

clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-wasip1
components: clippy

- name: Run clippy
run: cargo clippy --target wasm32-wasip1 -- -D warnings

fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt

- name: Check formatting
run: cargo fmt --check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/ref
deploy.sh
77 changes: 77 additions & 0 deletions .planning/PROJECT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# ZSM Usability Improvements

## What This Is

Usability polish for ZSM (Zellij Session Manager) — a Zellij plugin that integrates zoxide with session management. This round focuses on visual refinement and interaction improvements to make the session selector feel natural and pleasant.

## Core Value

The session selector should feel instant and intuitive — MRU ordering, clean visual hierarchy, and responsive feedback.

## Requirements

### Validated

<!-- Shipped and confirmed valuable. Inferred from existing codebase. -->

- ✓ Session list with existing and resurrectable sessions — existing
- ✓ Zoxide directory integration with smart session naming — existing
- ✓ Fuzzy search across sessions and directories — existing
- ✓ New session creation with folder and layout selection — existing
- ✓ Session stability tracking (prevents UI flicker) — existing
- ✓ Quick-switch to previous session — existing
- ✓ Configuration via Zellij layout options — existing

### Active

<!-- Current scope. Building toward these. -->

- [ ] Pleasant color palette — replace harsh pink/magenta with subtle, muted colors for live sessions
- [ ] MRU ordering — sessions ordered by most recent switch, with config option (MRU vs alphabetic), default MRU
- [ ] Tabular directory alignment — session names and directories in clean columns
- [ ] Updated title — "ZSM - Zellij Session Manager"
- [ ] Responsive session deletion — immediate UI feedback when killing sessions (reduce lag)
- [ ] Two-row help text — navigation keys on row 1, action keys on row 2, grouped logically

### Out of Scope

<!-- Explicit boundaries. Includes reasoning to prevent re-adding. -->

- New features — focus on polish, not new capabilities
- Settings screen — config stays in layout file, no in-plugin settings UI
- Keybinding changes — existing shortcuts must be preserved

## Context

ZSM is a WASM plugin running inside Zellij's sandbox. The UI renders via terminal escape sequences through zellij-tile. Current issues identified from screenshot review:

- Pink/magenta bullets (`○`) for live sessions clash with cyan session names
- Sessions sorted alphabetically, not by usage frequency
- Directory paths left-ragged after variable-length session names
- Help text at bottom wraps awkwardly with mixed key hints
- Session deletion has noticeable lag before list updates

Architecture (from codebase map):
- UI layer: `src/ui/renderer.rs`, `src/ui/theme.rs`, `src/ui/components.rs`
- State layer: `src/state.rs` — handles ordering and item combination
- Session layer: `src/session/manager.rs` — stability tracking affects deletion responsiveness
- Config layer: `src/config.rs` — will need new `sort_order` option

## Constraints

- **WASM sandbox**: Cannot write directly to filesystem; must shell out for persistence
- **29-char session names**: Unix socket path limit constrains display width
- **Zellij event timing**: SessionUpdate events can be inconsistent; existing stability tracking must be preserved

## Key Decisions

<!-- Decisions that constrain future work. Add throughout project lifecycle. -->

| Decision | Rationale | Outcome |
|----------|-----------|---------|
| MRU as default sort | User expectation matches shell history behavior | — Pending |
| Config option for sort | Some users may prefer alphabetical | — Pending |
| Muted color palette | Reduce visual noise, improve readability | — Pending |

---
*Last updated: 2026-01-13 after initialization*
137 changes: 137 additions & 0 deletions .planning/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Roadmap: ZSM Usability Improvements

## Overview

Polish ZSM's visual presentation and interaction patterns across six focused phases — from color refinement through responsive feedback — making the session selector feel instant and intuitive.

## Domain Expertise

None

## Phases

**Phase Numbering:**
- Integer phases (1, 2, 3): Planned milestone work
- Decimal phases (2.1, 2.2): Urgent insertions (marked with INSERTED)

- [x] **Phase 1: Color Palette** - Replace harsh pink/magenta with muted colors for live sessions
- [x] **Phase 2: MRU Ordering** - Sessions ordered by most recent switch with config option
- [x] **Phase 3: Tabular Alignment** - Session names and directories in clean columns
- [x] **Phase 4: Title Update** - Change title to "ZSM - Zellij Session Manager"
- [x] **Phase 5: Responsive Deletion** - Immediate UI feedback when killing sessions
- [x] **Phase 6: Help Text Layout** - Two-row help text with logical grouping
- [x] **Phase 7: Fix Session Naming Bug** - Fix session naming bug
- [x] **Phase 8: Resurrectable Session Improvements** - Improve resurrectable session handling and display
- [x] **Phase 9: Fix Session Name Editing** - Fix session name editing during session creation
- [x] **Phase 10: Help Text Phase 2** - Second iteration of help text improvements

## Phase Details

### Phase 1: Color Palette
**Goal**: Replace harsh pink/magenta bullet indicators with subtle, muted colors that complement the cyan session names
**Depends on**: Nothing (first phase)
**Research**: Unlikely (internal UI theming in src/ui/theme.rs and src/ui/components.rs)
**Plans**: TBD

Plans:
- [x] 01-01: Update theme colors for live session indicators

### Phase 2: MRU Ordering
**Goal**: Sort sessions by most recent switch rather than alphabetically, with a config option to choose sort order
**Depends on**: Phase 1
**Research**: Unlikely (state management in src/state.rs, config in src/config.rs)
**Plans**: TBD

Plans:
- [x] 02-01: Add sort_order config option
- [x] 02-02: Implement MRU tracking and ordering

### Phase 3: Tabular Alignment
**Goal**: Align session names and directory paths in clean columns for improved readability
**Depends on**: Phase 2
**Research**: Unlikely (renderer changes in src/ui/renderer.rs)
**Plans**: TBD

Plans:
- [x] 03-01: Implement columnar layout for session list

### Phase 4: Title Update
**Goal**: Change plugin title from current to "ZSM - Zellij Session Manager"
**Depends on**: Phase 3
**Research**: Unlikely (simple string change in renderer)
**Plans**: TBD

Plans:
- [x] 04-01: Update title string in renderer

### Phase 5: Responsive Deletion
**Goal**: Provide immediate visual feedback when deleting sessions to reduce perceived lag
**Depends on**: Phase 4
**Research**: Unlikely (session manager patterns in src/session/manager.rs)
**Plans**: TBD

Plans:
- [x] 05-01: Add optimistic UI update on delete action

### Phase 6: Help Text Layout
**Goal**: Reorganize help text into two rows with navigation keys on row 1, action keys on row 2
**Depends on**: Phase 5
**Research**: Unlikely (renderer component layout)
**Plans**: TBD

Plans:
- [x] 06-01: Restructure help text rendering

### Phase 7: Fix Session Naming Bug
**Goal**: Add session rename capability so users can rename sessions with unwanted `.2` suffix
**Depends on**: Phase 6
**Research**: None (using existing zellij-tile `rename_session()` API)
**Plans**: 1

Plans:
- [x] 07-01: Add session rename with Ctrl+n keybinding

### Phase 8: Resurrectable Session Improvements
**Goal**: Improve resurrectable session handling and display
**Depends on**: Phase 7
**Research**: None (internal state and rendering changes)
**Plans**: 1

Plans:
- [x] 08-01: Add Alt+D toggle for resurrectable sessions with pink coloring

### Phase 9: Fix Session Name Editing
**Goal**: Fix session name editing during session creation so users can modify the auto-generated name
**Depends on**: Phase 8
**Research**: Complete (Enter from name entry returns to Main instead of showing layout selection)
**Plans**: 1

Plans:
- [x] 09-01: Fix NewSession Enter key after name editing

### Phase 10: Help Text Phase 2
**Goal**: Two-color help text styling where keys are pink/magenta and labels are default foreground
**Depends on**: Phase 9
**Research**: None (internal UI styling)
**Plans**: 1

Plans:
- [x] 10-01: Two-color help text styling

## Progress

**Execution Order:**
Phases execute in numeric order: 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 → 9 → 10

| Phase | Plans Complete | Status | Completed |
|-------|----------------|--------|-----------|
| 1. Color Palette | 1/1 | Complete | 2026-01-14 |
| 2. MRU Ordering | 2/2 | Complete | 2026-01-13 |
| 3. Tabular Alignment | 1/1 | Complete | 2026-01-13 |
| 4. Title Update | 1/1 | Complete | 2026-01-13 |
| 5. Responsive Deletion | 1/1 | Complete | 2026-01-13 |
| 6. Help Text Layout | 1/1 | Complete | 2026-01-13 |
| 7. Fix Session Naming Bug | 1/1 | Complete | 2026-01-13 |
| 8. Resurrectable Session Improvements | 1/1 | Complete | 2026-01-14 |
| 9. Fix Session Name Editing | 1/1 | Complete | 2026-01-15 |
| 10. Help Text Phase 2 | 1/1 | Complete | 2026-01-16 |
89 changes: 89 additions & 0 deletions .planning/STATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Project State

## Project Reference

See: .planning/PROJECT.md (updated 2026-01-13)

**Core value:** The session selector should feel instant and intuitive — MRU ordering, clean visual hierarchy, and responsive feedback.
**Current focus:** Phase 10 - Help Text Phase 2

## Current Position

Phase: 10 of 10 (Help Text Phase 2)
Plan: 1 of 1 in current phase
Status: Phase complete
Last activity: 2026-01-16 — Completed 10-01-PLAN.md

Progress: ██████████ 100% (10/10 phases)

## Performance Metrics

**Velocity:**
- Total plans completed: 10
- Average duration: 7 min
- Total execution time: 66 min

**By Phase:**

| Phase | Plans | Total | Avg/Plan |
|-------|-------|-------|----------|
| 01 | 1 | — | — |
| 02 | 2 | 16 min | 8 min |
| 03 | 1 | 8 min | 8 min |
| 04 | 1 | 5 min | 5 min |
| 05 | 1 | 8 min | 8 min |
| 06 | 1 | 5 min | 5 min |
| 07 | 1 | 6 min | 6 min |
| 08 | 1 | 5 min | 5 min |
| 09 | 1 | 5 min | 5 min |

**Recent Trend:**
- Last 3 plans: 07-01 (6 min), 08-01 (5 min), 09-01 (5 min)
- Trend: Stable

## Accumulated Context

### Decisions

Decisions are logged in PROJECT.md Key Decisions table.
Recent decisions affecting current work:

| Phase | Decision | Rationale |
|-------|----------|-----------|
| 01-01 | Use direct color_range() for split coloring | Simpler than Theme helper methods, unifies themed/non-themed code paths |
| 01-01 | Keep unused Theme methods with #[allow(dead_code)] | Maintains API consistency for future use |
| 02-01 | MRU as default sort order | Matches user expectation from shell history behavior |
| 02-01 | Case-insensitive config value parsing | More forgiving for users |
| 02-02 | Use rfind(':') for timestamp parsing | Handles session names with colons |
| 02-02 | Append-based MRU persistence | Later lines override earlier - simple, natural MRU semantics |
| 03-01 | Cap name column at 35 chars | Ensures directory paths have adequate display space |
| 03-01 | 2-char gap between columns | Visual separation without wasting space |
| 04-01 | Use rename_plugin_pane() for pane title | Zellij API for setting pane frame title, not in-UI title |
| 05-01 | Extract remove_session_from_local_state() | Enables unit testing without FFI calls |
| 06-01 | Shortened "reload directories" to "Reload" | Better fit on row 2 without losing clarity |
| 07-01 | Pre-fill rename buffer with current session name | Enables easy editing vs starting from scratch |
| 07-01 | Shorten help text items for Ctrl+n | "Quick create" -> "Quick", "Delete" -> "Del" |
| 08-01 | Runtime toggle over config option for dead sessions | Ephemeral UI state doesn't need config persistence |
| 09-01 | Check state before handle_selection() | Captures pre-transition state for correct navigation logic |
| 10-01 | Use color index 3 for keys, default for labels | Creates visual distinction without theme dependency |

### Deferred Issues

None yet.

### Roadmap Evolution

- Phase 7 added: Fix session naming bug
- Phase 8 added: Resurrectable session improvements
- Phase 9 added: Fix session name editing during session creation
- Phase 10 added: Help Text Phase 2

### Blockers/Concerns

None yet.

## Session Continuity

Last session: 2026-01-16
Stopped at: Completed 10-01-PLAN.md (Phase 10 complete, Milestone complete)
Resume file: None
Loading