Skip to content

Preserve an explicit log selection during startup - #1755

Merged
tstack merged 1 commit into
tstack:masterfrom
ac1982:fix/preserve-startup-selection
Oct 14, 2026
Merged

tstack merged 1 commit into
tstack:masterfrom
ac1982:fix/preserve-startup-selection

Conversation

@ac1982

@ac1982 ac1982 commented Oct 14, 2026

Copy link
Copy Markdown

An initial -c ':goto 2' command selects the requested log row, but startup then calls set_top_for_last_row(), which moves that selection into the bottom viewport before session restoration. Only apply the default scroll when the log view has no explicit selection, matching the precedence already used by restore_view_states().

Adds real-terminal regressions for the default position, initial goto, saved-position restoration, and a new goto overriding the saved position. A replay-only option in the test helper allows these assertions to inspect the resulting selection without comparing transient screen redraws; child failures still fail the test.

Validation: the new initial-goto regression fails with the original binary and all four scenarios pass with this change. make -j4 check reports 53/56 passing on Linux arm64, including command, session, and TUI suites. The three failing suites (test_logfile.sh, test_sql_indexes.sh, test_log2src.sh) also fail with the original binary; they show stdin/timezone golden differences, SQL ordering/query-plan differences, and log2src schema/output differences respectively. Existing TUI snapshot diagnostics also occur on the original binary and are informational in the upstream harness. macOS and Windows were not tested.

Addresses the command-navigation part of #1741. This does not add file-specific file:line navigation to the merged log view.

Implemented and validated with OpenAI Codex.

@tstack
tstack merged commit 753b61b into tstack:master Oct 14, 2026
1 check passed
@tstack

tstack commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Seems to work, thanks!

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.

2 participants