Skip to content

feat: the board names the plugin version it is running - #25

Merged
OndrejDrapalik merged 2 commits into
mainfrom
feat/dash-version-in-header
Aug 26, 2026
Merged

feat: the board names the plugin version it is running#25
OndrejDrapalik merged 2 commits into
mainfrom
feat/dash-version-in-header

Conversation

@OndrejDrapalik

Copy link
Copy Markdown
Collaborator

Summary

The header's right side now reads v0.2.0 · theme: tokyo-night.

The question this answers comes up constantly with a plugin loaded from a working tree: is the
board I am looking at the board I just built?
Nothing on screen used to say. Today that took
reading herdr plugin list, checking which directory it points at, and comparing a binary's mtime
against tui/src — for a fact the header can simply state.

Where the number comes from, and where it deliberately doesn't

bin/e2b-dash resolves it with plugin_version() — which reads herdr-plugin.toml, the same
manifest herdr's own marketplace reads — and passes it in E2B_DASH_VERSION. Same shape as
E2B_DASH_DOMAIN_CMD: the shell owns resolution, the TUI never re-implements it, and the board can
never disagree with what herdr reports.

It pointedly does not use the crate's own CARGO_PKG_VERSION. tui/Cargo.toml carries a second
version with a comment saying to keep it in sync by hand — and it isn't: it still says 0.0.1 while
the plugin is at 0.2.0, because nothing in CI compares it (version-check only checks
package.json against herdr-plugin.toml). A drifted version in the header would be worse than no
version at all, so the number comes from the one file that is actually maintained. That drift is
left alone here rather than quietly fixed in an unrelated PR — see below.

Launched directly with no shell to resolve it, or with a manifest that could not be read (the shell
prints unknown), the header just omits it. A missing version costs nothing; a wrong one misleads.

Layout

The right-hand pair sheds items on a narrow pane, theme first. Both are context rather than live
state, but the version answers a question people actually ask of a plugin loaded from a checkout,
while the theme is already visible in every colour on screen — the cheapest thing to lose. The
region still never gives way.

Measured in a pty at four widths:

cols header
120 herdr-e2b-sandbox · 1 sandboxes · region euv0.2.0 · theme: tokyo-night
70 herdr-e2b-sandbox · region euv0.2.0 · theme: tokyo-night
52 e2b · region euv0.2.0 · theme: tokyo-night
40 herdr-e2b-sandbox · region euv0.2.0

The title getting longer between 52 and 40 looks wrong and is pre-existing behaviour, not a
regression: the search prefers the richest right-hand side and shortens the title to afford it, so
dropping the theme frees width the title takes back. Worth a separate look if it grates.

Test plan

  • cargo test — 28 pass, including a new case pinning the reader: a real version, a padded one,
    unknown, empty, and unset (each of the last three → omitted)
  • cargo fmt --check clean, cargo clippy --all-targets silent
  • npm test — 309 CLI cases pass
  • Rendered in a real pty at 120/70/52/40 cols; drop order verified

Follow-up, not done here

tui/Cargo.toml's version is stale (0.0.1 vs 0.2.0) and its "keep in sync" comment is not
enforced by anything. Either CI's version-check should compare all three files, or that version
should stop claiming to track the plugin's. Happy to take it in its own PR.

@cla-bot cla-bot Bot added the cla-signed label Aug 26, 2026
@OndrejDrapalik

Copy link
Copy Markdown
Collaborator Author

Swapped the pair so the version owns the corner:

cols header
120 herdr-e2b-sandbox · 1 sandboxes · region eutheme: tokyo-night · v0.2.0
70 herdr-e2b-sandbox · region eutheme: tokyo-night · v0.2.0
40 herdr-e2b-sandbox · region euv0.2.0

Drop order is unchanged and now reads more naturally with it: the theme goes first, so the version
is both the outermost item and the last to survive — it stays put in the corner instead of sliding
left when the theme disappears. Re-verified in a pty at those three widths; fmt, clippy and the 28
tests still clean.

@OndrejDrapalik
OndrejDrapalik merged commit 5e29d49 into main Aug 26, 2026
11 checks passed
@OndrejDrapalik
OndrejDrapalik deleted the feat/dash-version-in-header branch August 26, 2026 13:48
@OndrejDrapalik OndrejDrapalik mentioned this pull request Aug 26, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant