feat: open_direction config key — split the viewer right (default) or down - #152
Open
diegopzz wants to merge 1 commit into
Open
feat: open_direction config key — split the viewer right (default) or down#152diegopzz wants to merge 1 commit into
diegopzz wants to merge 1 commit into
Conversation
… work pane A new config key, open_direction = "right" (default) | "down", aims the split the launchers create: beside the work pane as today, or below it for tall, narrow layouts. The vocabulary is exactly what herdr's plugin pane open --direction accepts, so the config can never ask for a placement herdr cannot perform. The shells cannot parse TOML, so the binary gains a third probe mode, --open-direction, printing the resolved label through the same defensive config path the TUI uses: absent, malformed, or unrecognized values (and a missing binary) all degrade to right, today's layout. Both the unix and Windows launchers consume it; the tab launcher is untouched (no split to aim). The read-only Settings overlay gains the matching row. Tracking: OFFLINE-20260818-fileviewer-open-direction Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
diegopzz
force-pushed
the
open-direction
branch
from
August 18, 2026 08:41
0d5a3b6 to
a7c318e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new config key deciding which way the launchers split the viewer pane off the invoking work pane:
The vocabulary is exactly what
herdr plugin pane open --directionaccepts, so the config can never request a placement herdr cannot perform.How
config.rs:OpenDirectionenum (Rightdefault) resolved leniently (trimmed, case-insensitive) liketree_position; anything unrecognized keepsRightso a typo can never produce a--directionherdr rejects.--open-direction, printing the resolved label — the launchers cannot parse TOML, so they read the one value they need through the same defensive config path the TUI uses (missing binary / malformed config →right).scripts/open-file-viewer.shandscripts/open-file-viewer.ps1consume the probe. The tab launcher is untouched — it has no split to aim.docs/configuration.mdwith the placement-keys paragraph extended.Tests
cargo test(1436 passed),cargo fmt --check,cargo clippy --release --all-targets -- -D warningsall clean. New coverage: resolver (config-wins / default / lenient), argv parsing (probe precedence), settings-overlay row.🤖 Generated with Claude Code