Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
80c11cc
feat(theme): add theme module skeleton with Mocha builtin
SpollaL May 6, 2026
5aaeabe
chore: gitignore docs/superpowers (local-only specs and plans)
SpollaL May 6, 2026
ee17c18
feat(theme): add 8 more Base16 schemes (Catppuccin variants, Gruvbox,…
SpollaL May 6, 2026
d69691e
feat(theme): add theme_by_name, list_themes, theme_names_csv helpers
SpollaL May 6, 2026
0effe52
feat(theme): add state.toml read/write at explicit path
SpollaL May 6, 2026
3614423
feat(theme): add resolve_theme with CLI > env > state > default prece…
SpollaL May 6, 2026
15621ca
feat(theme): add --theme CLI flag and resolve at startup
SpollaL May 6, 2026
d7791a9
feat(theme): wire Theme through App and refactor ui.rs to read theme …
SpollaL May 6, 2026
3c6ec63
feat(theme): wire Theme through BrowserApp
SpollaL May 6, 2026
9a08b01
chore: remove catppuccin crate dependency
SpollaL May 6, 2026
d84876a
feat(theme): add ThemePicker struct and popup renderer
SpollaL May 6, 2026
7fed60e
feat(theme): add picker mode in App with live preview and persistence
SpollaL May 6, 2026
f33651b
feat(theme): add picker support in browse mode
SpollaL May 6, 2026
61ab871
test(qa): exercise theme picker in qa.sh
SpollaL May 6, 2026
eb34516
docs: document Base16 theme system and picker keybind
SpollaL May 6, 2026
9b3ac89
style: cargo fmt across theme refactor
SpollaL May 6, 2026
5ea1747
docs: fix and complete keybinding docs in help popup and README
SpollaL May 6, 2026
983031c
docs(ui): clarify PlotPickY shortcut hints for i and Enter
SpollaL May 6, 2026
1871cfb
docs(ui): surface i shortcut in PlotPickY primary bar
SpollaL May 6, 2026
6142dcf
fix: add area to render plot to not cover browser
SpollaL May 6, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
test_data.csv
test_data.parquet
docs/superpowers/
6 changes: 4 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ Source files under `src/`:
- **`app_tests.rs`** — Unit tests for `app.rs`, loaded via `#[path]` so they share `app`'s private scope (`FilterQuery`, `parse_operator`, etc.) without requiring visibility changes.
- **`config.rs`** — Application-wide numeric constants (`DEFAULT_COLUMN_WIDTH`, `PAGE_SCROLL_AMOUNT`, etc.).
- **`events.rs`** — The main event loop (`run_app`). Reads crossterm key events and dispatches to `App` methods or small helper functions based on `app.mode`.
- **`ui.rs`** — All ratatui rendering. Uses Catppuccin Mocha (`PALETTE.mocha`) for colors via a thin `c()` helper. `count_visible_from()` handles horizontal viewport windowing; `ViewportState` tracks `row`/`col` offsets so large files stay fast.
- **`ui.rs`** — All ratatui rendering. Resolves colors from the active `&'static Theme` (`app.theme`) — no hardcoded palette references. `count_visible_from()` handles horizontal viewport windowing; `ViewportState` tracks `row`/`col` offsets so large files stay fast.
- **`theme.rs`** — Base16 theme system. Owns 9 built-in `Base16Scheme` constants, the semantic `Theme` struct (slot-based: `bg`, `bg_alt`, `accent`, `error`, `series[6]`, etc.), state file I/O at `~/.config/datasight/state.toml`, and the `resolve_theme(cli, env, state)` precedence function (CLI > env > state file > `mocha`).
- **`theme_picker.rs`** — `ThemePicker` state (cursor + original theme name) and `render_picker()` popup helper, used by both `App` (plain mode) and `BrowserApp` (browse mode).

### State sub-structs

Expand All @@ -69,7 +71,7 @@ Source files under `src/`:

### Mode state machine

`Mode` variants (defined in `app.rs`): `Normal`, `Search`, `Filter`, `PlotPickY`, `PlotPickX`, `Plot`, `ColumnsView`, `UniqueValues`. The event loop in `events.rs` matches on `app.mode` first; `ui.rs` branches on mode to render the appropriate full-screen view or popup overlay.
`Mode` variants (defined in `app.rs`): `Normal`, `Search`, `Filter`, `PlotPickY`, `PlotPickX`, `Plot`, `ColumnsView`, `UniqueValues`, `ThemePicker`. The event loop in `events.rs` matches on `app.mode` first; `ui.rs` branches on mode to render the appropriate full-screen view or popup overlay. In browse mode (`BrowserApp`), the picker is gated by an `Option<ThemePicker>` field instead of a mode variant, and `BrowserApp` propagates its `&'static Theme` to the viewer's `App` on file load and on every picker key event so live preview stays in sync across both panes.

### Data flow

Expand Down
207 changes: 195 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ aws = ["dep:object_store", "object_store/aws", "dep:tokio"]
crossterm = "0.29.0"
ratatui = "0.30.0"
polars = { version = "0.46", features = ["csv", "parquet", "lazy", "strings", "regex", "json", "temporal", "dtype-date", "dtype-datetime", "dtype-decimal"] }
catppuccin = "2"
clap = { version = "4", features = ["derive"] }
dirs = "5"
serde = { version = "1", features = ["derive"] }
toml = "0.8"
object_store = { version = "0.11", optional = true }
tokio = { version = "1", features = ["rt-multi-thread"], optional = true }

[dev-dependencies]
tempfile = "3"

# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
Expand Down
Loading
Loading