Skip to content

tix improvements - #3041

Draft
Sebastian Thiel (Byron) wants to merge 109 commits into
mainfrom
tix-improvements
Draft

Sebastian Thiel (Byron) wants to merge 109 commits into
mainfrom
tix-improvements

Conversation

@Byron

@Byron Byron commented Oct 4, 2026

Copy link
Copy Markdown
Member

Tasks

  • ensure to review gix changes before merging

@Byron
Sebastian Thiel (Byron) force-pushed the tix-improvements branch 3 times, most recently from 097594c to d427bb3 Compare October 12, 2026 04:40
@Byron
Sebastian Thiel (Byron) force-pushed the tix-improvements branch 8 times, most recently from e8c4817 to 690d109 Compare October 22, 2026 04:48
@Byron
Sebastian Thiel (Byron) force-pushed the tix-improvements branch 3 times, most recently from a2fa36c to 9c3496b Compare October 27, 2026 11:59
Comment thread gix/src/status/monitor/tests.rs Fixed
@Byron
Sebastian Thiel (Byron) force-pushed the tix-improvements branch 3 times, most recently from 40eb9a6 to fb4099b Compare November 2, 2026 06:52
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Nov 2, 2026
After rebasing PR #3041, CodeQL classified fixture commit header data
printed by two failing assertion messages as sensitive data reaching a log.
These tests use isolated fixture repositories, but dumping copied IDs or
an entire rendered graph is unnecessary to explain their invariants.
Keep the assertions and their explanations without those metadata dumps.

Both tests came from shared base history, so this correction belongs in a
new branch commit. No runtime behavior or security policy changes.

Validation: the pasted-ID and raw-tip rendering regressions pass with
SHA-1 and SHA-256 enabled and the locked dependency graph.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Nov 2, 2026
After rebasing PR #3041, CodeQL classified fixture commit header data
printed by two failing assertion messages as sensitive data reaching a log.
These tests use isolated fixture repositories, but dumping copied IDs or
an entire rendered graph is unnecessary to explain their invariants.
Keep the assertions and their explanations without those metadata dumps.

Both tests came from shared base history, so this correction belongs in a
new branch commit. No runtime behavior or security policy changes.

Validation: the pasted-ID and raw-tip rendering regressions pass with
SHA-1 and SHA-256 enabled and the locked dependency graph.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Nov 2, 2026
After rebasing PR #3041, CodeQL classified fixture commit header data
printed by two failing assertion messages as sensitive data reaching a log.
These tests use isolated fixture repositories, but dumping copied IDs or
an entire rendered graph is unnecessary to explain their invariants.
Keep the assertions and their explanations without those metadata dumps.

Both tests came from shared base history, so this correction belongs in a
new branch commit. No runtime behavior or security policy changes.

Validation: the pasted-ID and raw-tip rendering regressions pass with
SHA-1 and SHA-256 enabled and the locked dependency graph.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Nov 3, 2026
After rebasing PR #3041, CodeQL classified fixture commit header data
printed by two failing assertion messages as sensitive data reaching a log.
These tests use isolated fixture repositories, but dumping copied IDs or
an entire rendered graph is unnecessary to explain their invariants.
Keep the assertions and their explanations without those metadata dumps.

Both tests came from shared base history, so this correction belongs in a
new branch commit. No runtime behavior or security policy changes.

Validation: the pasted-ID and raw-tip rendering regressions pass with
SHA-1 and SHA-256 enabled and the locked dependency graph.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Nov 4, 2026
After rebasing PR #3041, CodeQL classified fixture commit header data
printed by two failing assertion messages as sensitive data reaching a log.
These tests use isolated fixture repositories, but dumping copied IDs or
an entire rendered graph is unnecessary to explain their invariants.
Keep the assertions and their explanations without those metadata dumps.

Both tests came from shared base history, so this correction belongs in a
new branch commit. No runtime behavior or security policy changes.

Validation: the pasted-ID and raw-tip rendering regressions pass with
SHA-1 and SHA-256 enabled and the locked dependency graph.
Sebastian Thiel (Byron) pushed a commit that referenced this pull request Nov 5, 2026
After rebasing PR #3041, CodeQL classified fixture commit header data
printed by two failing assertion messages as sensitive data reaching a log.
These tests use isolated fixture repositories, but dumping copied IDs or
an entire rendered graph is unnecessary to explain their invariants.
Keep the assertions and their explanations without those metadata dumps.

Both tests came from shared base history, so this correction belongs in a
new branch commit. No runtime behavior or security policy changes.

Validation: the pasted-ID and raw-tip rendering regressions pass with
SHA-1 and SHA-256 enabled and the locked dependency graph.
Tix needs to honor the repository's terminal diff settings while reviewing
changes, including paths that have no file on disk. Add reusable
`Repository::difftool_command()` and `Repository::pager_command()` helpers
that prepare trusted commands with repository context.

Use Git's native difftool helper for built-in and custom tools, ignore GUI
defaults, and retain the tool's exit status. Let resource commands own
temporary inputs with the original filenames so external tools can detect
their language. Tool paging is opt-in through `pager.difftool`. Ordinary
pager preparation preserves the caller's fallback when `core.pager` is
absent, empty, or `cat`.
Reviewing a stack needs a way to see which files and declarations changed,
then read all changes without leaving Tix or launching a tool per file.
`Shift+Enter` opens a built-in structural view for the selected commit or
branch comparison, or the selected path when a changes pane has focus.

Start with a directory tree of changed files, then show every file's
`diff --git`, rename/mode, `---`, and `+++` headers and structural outline
in one continuous view. Reuse the existing diff navigation and add
`g`/`G` and `Home`/`End` to reach either end. Draw only the visible page so
scrolling also works past 65,535 rows.

Keep the Tree-sitter grammars and outline engine inside `gix-tix` so the
review view owns parsing Rust declarations, TOML keys, and Markdown
headings. Adapt the engine from the `structural-diff` worktree and retain
its parser and rendering regression tests. Bodies, values, and prose participate in
comparison while their contents remain hidden. `r` toggles declaration
rename matching and `w` toggles word changes; both start enabled and
persist across views. Redraw cached outlines without reparsing or reading
objects, and always enable file rename detection for tree comparisons.
Keep empty, mode-only, unsupported, binary, and malformed files in the
view with their headers and an explicit outline status.

Prepare resources with a fresh bounded repository and preserve the active
merge parent, branch base, staged blobs, and unstaged/untracked contents.
Drop idle navigation and line-count repositories before waiting in a diff
view. Share parsed source text and retain detached display data only.

Keep plain `Enter` patch and external-driver behavior, using
`Repository::pager_command()` for configured paging. Prevent worktree
roots from overriding a staged blob or a missing diff side. Update the
behavioral specification and retain inspection during selections and
conflict resolution without accepting edits.

Validation:
- `cargo test --offline -p gix-tix --features sha1,sha256,http-client-curl`:
  1,039 library tests, the binary and diagnostics tests, and all 13 native
  terminal tests pass; the ignored PTY child entry point is intentional.
- `cargo clippy --offline -p gix-tix --features sha1,sha256,http-client-curl
  --all-targets -- -D warnings` passes.
- Structural fixtures cover file trees, additions/deletions/renames,
  root/branch/merge scopes, staged/worktree identities, hidden bodies,
  live redraws, empty commits, and scrolling from first to last change.
- Formatting, fixture syntax, and `git diff --check` pass.
The continuous structural view needs the visual cues of `delta` to make
declarations and changed words easy to scan. Fixed background shades are
unreadable with some terminal themes, so derive diff colors from the
terminal's foreground, background, and ANSI palette instead.

Reuse the Kitty OSC 21 palette query and OSC 4 fallback before graphics
detection, within the existing startup budget. Text-only views receive
the same palette. Cache colors once, preserve transparent context rows,
and use named ANSI colors when default-color replies are unavailable.

Add subtle red/green row backgrounds, stronger changed-word backgrounds,
colored file statuses and header bands, and lexical syntax colors for
Rust declarations, TOML keys, and Markdown headings. Adjust foregrounds
to retain at least 4.5:1 contrast against each sampled background.
Fill changed rows through the viewport's right edge and preserve word
emphasis over syntax styles.

Color only visible rows using borrowed display text, retaining no syntax
token strings and preserving Unicode graphemes. Scrolling and live
rename/word toggles make no terminal queries or source reads. Document
startup sampling and fallbacks in the behavioral specification.

Validation:
- `cargo test --offline -p gix-tix --features sha1,sha256,http-client-curl`
  passes all 1,044 library tests, the binary and diagnostics tests, and
  14 native terminal tests. The ignored PTY child entry point is intentional.
- `cargo clippy --offline -p gix-tix --features sha1,sha256,http-client-curl --all-targets -- -D warnings` passes.
- Regressions cover light/dark/custom themes, text-only Kitty sampling,
  contrast, full-row backgrounds, changed-word emphasis, Unicode glyphs,
  and color-query-free scrolling.
- Rust formatting and `git diff --check` pass.
Structural review needs a production-only view without test declarations,
context, or parent modules marked modified solely by test edits.
Filtering rendered rows would retain those false parent changes and could
not tell callers which files still have production changes.

Add `Options::production_only`, and classify Rust test/benchmark attributes
and scopes disabled with `test` set to false while parsing. Evaluate nested
`all`, `any`, and `not` conservatively: unknown platform and feature terms
keep any declaration that might be enabled in production. Include inner
attributes and qualified test attributes.

Exclude classified declarations before alignment, rename matching, context,
and whole-declaration rendering. Compare containers containing tests through
raw source ranges outside their bodies and their included children. This
keeps hidden production expressions and attribute values in comparison.
Retain full hidden-content comparison for other declarations. Store flags
and body ranges alongside the existing outlines without copying source text
or reparsing on redraw. Outline tuple fields individually, using their
filtered positions, so test fields disappear without hiding production fields.

Provide outline queries so the Tix file tree can decide visibility
without allocating a second rendered diff.

Outline regressions cover nested and whole-file test changes,
inner attributes, production body/signature/attribute changes, tuple fields,
cached redraws, and conservative conditional configuration.
Reviewing production changes should not require scrolling past tests,
benchmarks, examples, and fixtures or their file-tree entries. Use `p` in
the built-in structural view to toggle production-only review, initially
disabled, and retain the setting for later views in the same invocation.

Filter conventional development directories and Rust test-helper filenames,
then use the cached structural outlines to remove inline test declarations
and files changed only by tests. Rebuild the file count and tree from visible
files, prune empty directories, and omit all hidden per-file sections.
An entirely filtered comparison says `No production file changes.`

Keep documentation and unclassified files visible. Preserve production
mode changes and renames, including moves across the production boundary;
copies into non-production paths remain hidden. Keep declaration rename
and word settings independent, and expose the production setting in the
footer. Ignore repeated, released, and modified setting keys.

Redraw detached cached outlines without source reads, parsing, terminal
queries, or additional source copies. Navigation clamps to the filtered
row count. Document conventional-path classification and opaque-input
limits in the behavioral specification.

All 1,048 library tests, binary/diagnostics tests, and 15 native terminal
tests pass with `sha1,sha256,http-client-curl`; the ignored PTY child entry
point is intentional. Strict all-target Clippy, Rust formatting, fixture
syntax, and `git diff --check` pass. Regressions cover thirteen files
reduced to five, erased screen cells, empty views, production metadata,
live/reopened settings, and terminal restoration.
Long structural and patch diffs previously scrolled their file names out of
view, leaving readers to scroll back to identify the current changes. Keep
each file header in normal flow until it passes the viewport top, then freeze
it above the content until the next file reaches the top. Leave the overview
unpinned and retain the existing header colors and horizontal panning.

Cache file boundaries alongside detached display rows and refresh them when
structural settings change. Patch boundaries come from prepared files rather
than interpreting hunk contents; deleted files retain their old filename.
Account for the frozen row in paging and end offsets so every change remains
reachable. A single-row content viewport prioritizes the changes themselves.
The configured pager receives the same bytes as before.

Validate header transitions, live structural settings, theme backgrounds,
added/deleted/renamed patch names, panning, viewport sizes, commit aggregation,
and unchanged pager output. The full `gix-tix` test suite and strict Clippy pass
with `sha1,sha256,http-client-curl`; formatting and whitespace checks pass.
The continuous structural view enabled mouse capture but ignored mouse input,
so readers could neither scroll naturally nor use its file tree to navigate a
large review. Handle wheel input in the shared built-in diff loop and let a
left-button press on a structural file-tree filename jump to its patch header.

Cache file-tree row, display-column range, and destination while rendering the
detached data. Refresh targets with `p`, `r`, and `w`, account for viewport and
horizontal offsets, and reset horizontal panning on a jump. Directories, blank
space, modified clicks, drags, and releases do not activate file links. Ignore
mouse events while unfocused and scrolling outside the diff, including the
worktree picker. Reuse the existing wheel actions for both built-in modes.

Allow even a short final file to be aligned at the viewport top while retaining
the existing final-page behavior of `End` and `G`. Navigation requires no Git
object reads, source parsing, or additional copies of source text.

Regression coverage checks live settings, file destinations, panning, viewport
bounds, scrolling beyond 65,535 rows, and real terminal click/wheel handling and
restoration. All 1,052 library tests and 16 native terminal tests pass, along
with the other `gix-tix` test targets and strict Clippy using
`sha1,sha256,http-client-curl`. Formatting and whitespace checks pass.
Structural review always showed one unchanged sibling around a change, leaving
readers unable to remove that context when focusing on the modifications.
Add `c` to toggle between zero and one at every nesting depth. Preserve the
existing default of one, show the active value in the footer, and retain the
setting when opening another structural view in the same invocation.

Use the existing cached-outline renderer and shared options. Reuse the context
vector and refresh display rows, frozen headers, and file-tree click targets
without source reads or parsing. Only unmodified key presses toggle context;
repeats, releases, and modified keys leave it unchanged.

Cover removal and restoration of unchanged declarations, persistence, footer
display, input guards, and mouse/header correctness after toggles. Extend the
native terminal test to verify the shortcut and persistence when reopening.
All 1,053 library tests, 16 native terminal tests, and other `gix-tix` test
targets pass with `sha1,sha256,http-client-curl`, along with strict Clippy,
formatting, and whitespace checks.
The continuous structural diff's overview scrolled away while reading file
changes. Add `Tab` to reopen that tree in a panel on the left without moving
the main diff vertically; another press hides it and restores the full width.
The panel starts hidden in each view and reserves a third of the width, capped
at 48 columns. Ignore repeated, released, or modified Tab events.

Highlight every file section visible on the right, including the file named
by its frozen header. Automatically bring the current file into view and let
wheel input over the panel scroll the tree independently. Clicking a filename
uses its existing jump target and clears diff panning. Adjust main scrolling
and hit testing to the narrower viewport, and use compact setting labels there.

Reuse cached tree rows and index file targets for bounded viewport rendering
and lookup. Context, word, declaration-rename, and production toggles refresh
panel rows and targets without retaining repositories, reading sources,
reparsing inputs, or copying source text.

Cover visibility and input guards, simultaneous file highlighting, mouse
coordinates, independent scrolling, follow behavior, live filtering, and narrow
layouts. A native terminal regression opens the panel after scrolling, jumps
through it, hides it, and verifies terminal restoration. All 1,056 library tests,
17 native terminal tests, and other `gix-tix` test targets pass with
`sha1,sha256,http-client-curl`, along with strict Clippy, formatting, and
whitespace checks.
File paths were easy to lose among hunk rows, especially while scrolling. Render filename rows in bold reverse video across the viewport in both built-in diff modes, including when frozen. Use the terminal defaults for the reversed colors so the band follows the active theme.

Use the recorded patch filename positions to avoid styling hunk text as a header. Check the highlight, viewport width, and neighboring hunk styling in the existing frozen-header regressions.
Open structural review with zero unchanged siblings around changes so readers can focus on modified declarations immediately. Pressing c adds one sibling of context, and the choice persists across views in the same invocation.

Exercise the app default in the structural rendering and native terminal regressions. The full gix-tix suite and strict Clippy pass with sha1, sha256, and http-client-curl enabled.
Structural changes can hide substantial body edits. Show raw text insertions and deletions alongside each filename in the overview and sidebar, and display directory totals in the footer on hover. Count only the visible descendants and report entries without line counts separately.

Reuse the line-count pipeline without text conversion, which keeps the statistics comparable with the normal patch summary. Cache them during preparation and rebuild the directory totals from detached data when filtering. Keep filename click regions independent of the counts.

Compare fixture counts with Git and verify directory totals before and after filtering, sidebar hit testing, and native hover events.
Deep path trees used four columns at each level, taking space away from filenames and their line counts. When the terminal has confirmed Kitty graphics support, reserve one cell per level and reuse the commit graph backend to draw thin connector tiles in the overview and sidebar.

Tag only visible connector cells. Use the rendered tree layout for directory hover and filename clicks, including when the overview is panned. Terminals without confirmed graphics use the text tree.

Exercise both layouts, clipped graphical connectors, click targets and native Kitty placements. The Tix suite and strict Clippy pass with sha1, sha256, and http-client-curl enabled.
Show directory totals on the hovered directory row in the overview and sidebar so the numbers stay next to their label. Keep the entry highlight on the filename and its label spans so line counts retain the terminal background.

Size the sidebar from the widest tree row, including its diffstat or potential hover totals. Recompute that width after filters change and reserve a column for the diff on narrow terminals. Measuring potential totals keeps the split stable on hover.

Verify inline placement, separate highlighting, and long filenames in the rendering tests. The native terminal tests check hover output on the directory row. All gix-tix test targets and strict Clippy pass with sha1, sha256, and http-client-curl.
Use the same theme-aware addition and deletion foregrounds for directory totals and per-file diffstats. The totals appear beside the hovered directory on the terminal background in both structural trees.

The structural rendering tests verify both count colors and the background. The native hover tests and strict Clippy pass.
…gments

Structural review can focus on a changed function by collapsing runs of
unchanged Rust parameters. Align complete parsed arguments so nested
commas, receiver edits, and reordering retain their meaning. Keep return
and where clauses, attribute redaction, and added or deleted declarations
intact.

Add internal render settings for compact signatures and word fragments
without delimiters. Tix can use terminal color to emphasize the original
fragments directly, while the default rendering retains its format.

Outline regressions exercise nested commas, receiver edits, reordered
arguments, and unadorned word fragments.
Use compact signatures in structural review. Long parameter lists can obscure a small edit. Collapse unchanged argument runs in paired Rust functions and methods and retain changed arguments, return types, and where clauses.

The structural view regression covers a renamed function with one unchanged parameter and a changed parameter and return type.
Use stronger theme tints to make added, removed, and modified declarations easy to spot. Color mode styles raw word fragments and omits structural line markers and word delimiters. Plain mode uses the markers to preserve those distinctions.

Use v to toggle color and retain the choice across views. NO_COLOR starts plain, and an explicit opt-in applies to structural diff draws. Keep named foreground colors as a fallback when terminal theme replies are unavailable.

Verify the marker transition, restored plain text, color contrast, and the native toggle starting from NO_COLOR. The full gix-tix test suite and strict Clippy pass with sha1, sha256, and http-client-curl enabled.
The structural diff footer listed every setting and movement key, so
hints could be cut off when the file panel was open. Use a single status
bar with the row position, prefix labels, and a back shortcut, matching
the compact layout of history.

Put live presentation settings under `v` and navigation help under `?`.
Reuse history's highlighted shortcut glyphs and wrapping popouts. Keep
View open for consecutive toggles and retain direct `Tab` access to the
file tree. Cover the prefix layout and settings persistence with renderer
and terminal tests.
Strong fills drew attention away from the outline text. Restore the
softer theme-relative tints on declaration rows and changed words,
keeping word changes more distinct than their surrounding row.

Give declaration names and language keywords bold weight. Apply that
weight in ANSI fallback and plain mode as well, where declaration rows
keep their existing foregrounds and plain mode keeps its change markers.
Exercise contrast and token emphasis across the supported palettes.
Reviewers looking for declarations or paths that were introduced, removed,
or renamed had to read through body, signature, and metadata edits to find
them. Add `v m` to filter those edits from the structural review.

Keep modified files that contain declaration additions, removals, or renames,
and use their enclosing declarations as context. Rebuild the file trees and
jump targets from the filtered outline and retain the setting between views.
An open Tix session in the `gitoxide.grix` worktree exited when a
separate rebase checked out a merge replay conflict. The watcher
reopened hidden changes panes without recreating the line-diff pool,
so the first redraw returned a fatal error.

Restore the pool and worktree watch coverage when the watcher enters
conflict resolution, then refresh worktree status. Exercise the external
checkout in a pseudoterminal, including a later worktree edit.
Reviewing Python changes in Tix previously showed file headers without
an outline. Parse `.py` and `.pyi` with Tree-sitter so reviewers can see
class and function signatures, decorators, and simple named bindings.

Reuse the existing structural comparison, keeping function bodies and
assigned values hidden. Apply the production filter to conventional
Python test filenames and exercise the view through `Shift+Enter`.
Keep the generated lockfile with its manifest so locked builds work.
Reviewers could open one path from a changes pane or switch back to
history to open a commit diff. The worktree pane had no way to review
its staged and unstaged changes together.

Select the title when focus enters a change list and let navigation
move between history, the title, and its paths. Open full patch and
structural comparisons from the titles, retaining path diff behavior
for file rows. Expand untracked directories for the whole worktree
review and give staged and unstaged versions separate sections and
jump targets.
The structural overview showed per-file diffstats and directory totals
on hover, so judging the size of the full comparison required adding
up its entries. Put totals beside the changed-files heading in the same
style as the individual diffstats.

Use the visible file tree to count additions, deletions, and paths without
line counts, so the totals follow live filters in both views.
Green additions could look like yellow modifications in a structural
diff without an unchanged row for reference. Increase both red and
green row tints so additions and removals read as distinct changes.
Increase word-level tints as well so they still stand out within a row.

Keep the shades relative to the terminal palette and verify readable
foregrounds on light, dark, and unusual themes.
A commit may already credit one model before another model helps with
an edit. Hiding every suggestion for an existing trailer key makes the
new attribution harder to add.

Compare each suggestion with the parsed trailers in the message body.
Preserve case-insensitive keys and compare values case-sensitively so
distinct model names remain available even when they share an email.
Use the same matching for configured new-commit messages.
A pushpin next to several branch labels can look like it belongs to
one of the branches. At terminal cell sizes, a miniature pin drawn
inside the node is also hard to see.

Place a separate two-column RGBA pushpin above the node with its tip
over the commit disc. Share the image across pins of the same size and
brightness and reuse the original graph tiles when pins move or are
removed. Use the existing placement cache and cleanup for both layers.

The renderer gets the pin state from the row's decorations without
adding per-commit storage. Text history keeps the pushpin character,
and symbolic pins on visible refs keep their exact label.
A user who has staged part of their work may want to set just that
part aside and keep working on the rest. Match the default commit
selection for the CLI and TUI stash actions.

Use Git's staged-only save when the index differs from `HEAD` and
include tracked and untracked changes when the index is clean.
Travel saves the complete departure state for checkout and rollback.
Report the Git stash ID when a failed staged removal leaves a
recovery entry in the ordinary stash stack.
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.

3 participants