Skip to content

GUI first: one package, header/names overrides, analysis cache - #1

Merged
uky007 merged 5 commits into
mainfrom
feature/gui-first
Oct 2, 2026
Merged

uky007 merged 5 commits into
mainfrom
feature/gui-first

Conversation

@uky007

@uky007 uky007 commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Round two of the hands-on feedback, on a branch so each piece can be backed out.

  • One package gridsift with both binaries; cargo install gridsift installs gridsift-desktop and gridsift, cargo run starts the application (default-run, workspace default-members).
  • Header or not is the analyst's call: --header / --no-header on the desktop launch line, a header / no header button in the sidebar that reopens the file the other way, and --names a,b,c plus a name columns… dialog for files without a header; names reach export manifests (source.dialect.names).
  • Analysis cache (<cache>/analysis/*.gsan): the file-wide profile, whole-file counts and timelines survive between sessions, bound to size / mtime / SHA-256; the dashboard of a reopened file is there at once, freq / timeline / profile report cached.

Editing with named versions follows on feature/editing, branched from here.

🤖 Generated with Claude Code

uky007 and others added 3 commits October 1, 2026 20:29
…cation

The desktop application is the product; the command line serves scripts
and batch work. Both now come from the `gridsift` package, so `cargo
install gridsift` installs `gridsift-desktop` and `gridsift`, and `cargo
run` at the repository root starts the application (`default-run`,
workspace `default-members`). The desktop sources move to
`src/bin/gridsift-desktop/`; the `gridsift-desktop` package is gone and
the binary names are unchanged.

NOTICE, README, docs/installation.md, CONTRIBUTING.md, the design notes
and the CHANGELOG follow; the per-crate licence copies follow the crates.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The sniffer decides whether the first record is a header, and it is right
most of the time; when it is not, the reading can now be overridden
everywhere. The desktop launch line takes `--header` / `--no-header` like
the command line, and the sidebar's dialect line shows the reading as a
button that reopens the file the other way (the index is keyed by the
setting, so both readings keep their own sidecar).

`--names a,b,c` names the columns of a file without a header: on the
command line it resolves `-c` and labels output, on the desktop it is a
launch option and a *name columns…* dialog. The names are recorded in the
manifest of every export (`source.dialect.names`) and never written to
the file. Tests: the CLI reads a numeric first record as data under
`--names` and the manifest carries them; the desktop test checks both
readings of the same file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… sessions

Reopening a file used to recompute everything the dashboard shows. The
file-wide column profile, value counts over all records and timelines are
now written to `<cache>/analysis/<stem>.<key>.gsan` beside the index
sidecar, bound to the source's size, modification time and SHA-256 (when
known). The next open of the same bytes builds the dashboard from the
cached profile at once, serves its counts and timeline from the cache,
and starts no profile pass; the Values tab says *cached*. Counts over a
selection or of derived columns are never cached, a changed file never
uses the cache, and nothing is written next to the evidence (the same
source guard as the index). `freq`, `timeline` and `profile` on the
command line use the same cache and report `cached`.

A timeline result now records the reference year it was parsed with, so
a cached one is only reused in the same year. A profile of a file that
fits in the head sample counts as file-wide (it saw every record).

The dashboard and its timeline no longer start while the index is still
being built. Tests: cache semantics in core (serving narrower requests,
replacing with wider ones, identity by size/mtime/digest, the source
guard), the desktop round trip through two opens and a changed file, and
the command-line path including the profile and a selection.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A timeline at one-second resolution over the ten days of CTU-13 is 472k
buckets — 7.5 MB of JSON — and parsing it on every open or `freq` call
cost more than the count it was meant to save: first rows went from
milliseconds to ~0.4 s and a cached count of the 4.9 GB file took longer
than counting it on a warm cache. Timelines now live in a `.gstl` beside
the `.gsan`, bound to the same bytes, merged across sessions, and read
only by the worker that needs one (the desktop's timeline thread, the
`timeline` command); the profile and counts stay a few KB and load with
the file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@uky007
uky007 force-pushed the feature/gui-first branch 2 times, most recently from 1ceb988 to d019850 Compare October 2, 2026 09:22
The default tab was Values, but the dock itself stayed closed until a
column action opened it, so a freshly opened file showed no tabs at all
and the dashboard built in the background was out of reach without a
detour. The dock now opens with the file, on Values with its column
picker, and an *Analysis* chip in the command bar hides and shows it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@uky007
uky007 force-pushed the feature/gui-first branch from d019850 to 7fa099b Compare October 2, 2026 09:24
@uky007
uky007 merged commit 7fa099b into main Oct 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant