Skip to content

feat(app): show the version in the window title - #83

Open
lpalvess wants to merge 1 commit into
tobi:mainfrom
lpalvess:show-version-in-title
Open

lpalvess wants to merge 1 commit into
tobi:mainfrom
lpalvess:show-version-in-title

Conversation

@lpalvess

Copy link
Copy Markdown

What

The window title now includes the version: disktree 0.11.0 · <dir> instead of disktree · <dir>. The version comes from CARGO_PKG_VERSION, so it follows the workspace version.

The title is built by one function, marks::window_title, which both places that set it now use (opening the window in main.rs, rendering in state.rs). Before, the format was written in both places.

Testing

  • Unit test in marks.rs for the exact title, under a home directory and at the home directory itself.
  • Window harness test in tests.rs: reads the real window title on open, presses Enter, and reads it again in the child directory. It fails without the change, and also if render stops calling set_window_title.
  • cargo xtask lint and cargo xtask test pass on Linux (217 tests).

Not checked by hand on macOS or Windows; the change is the title string only.

Closes #76

🤖 Generated with Claude Code

The titlebar read "disktree · <dir>", so the only way to know which build
was running was the terminal. It now reads "disktree 0.11.0 · <dir>",
from CARGO_PKG_VERSION. Both places that set the title (the window
options at launch and the render that follows navigation) go through one
marks::window_title, so the two formats cannot drift apart.

A unit test pins the format, and a window-harness test reads the real
window title before and after Enter descends into a directory.

Closes tobi#76

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lpalvess
lpalvess force-pushed the show-version-in-title branch from 23f03b6 to b63f28e Compare October 11, 2026 20:42
@lpalvess lpalvess changed the title Show the version in the window title feat(app): show the version in the window title Oct 11, 2026
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.

Show version in title

1 participant