feat(tui): add configurable VCS column#51
Merged
Conversation
Added a build job for multiple platforms and updated dependencies installation.
Co-authored-by: OpenAI Codex <codex@openai.com>
mabd-dev
requested changes
May 31, 2026
mabd-dev
left a comment
Owner
There was a problem hiding this comment.
Looking good. The only big thing is a ColumnDef.cell can be nil which crashes the app
frittlechasm
force-pushed
the
feat/jjsupport
branch
from
June 9, 2026 05:25
f296b4e to
0ac0338
Compare
Owner
|
@greptileai review |
Owner
|
@frittlechasm thanks for the contribution. PR looks great |
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.
Pull Request
Description
Adds a new
[tui] showVCSconfiguration option for the interactive TUI output. This lets users hide the VCS column when they do not need it, while keeping the existing default behavior of showing the column.As there might be more similar TUI options in the future have implemented a small Config Layer that can be passed to the repo table renderer instead of passing the full application config around.
This should close #49
Changes Made
Tuiconfig support withshowVCS, defaulting totruefor existing configs.repostable.Optionsvalue into the TUI table renderer instead of exposing full config to the table package.[tui] showVCSoption.Testing
filters,output, etc...Screenshots (if applicable)
ShowVCS = false

ShowVCS true

Checklist
Additional Notes
The config layer owns the defaulting behavior through ShowVCSColumn(), so existing config files without [tui] showVCS continue to show the VCS column.
The TUI table uses a small rendering options model and derives both headers and row cells from the same active column list. This avoids header/cell drift if more optional columns are added later.
Greptile Summary
This PR adds a
[tui] showVCSconfiguration option that lets users hide the VCS column in the interactive table. It introduces a narrowrepostable.Optionsstruct so the table renderer doesn't take a full application config, and refactors column/row creation to share a singlecolumnDeflist so headers and cells always stay aligned when columns are toggled.internal/config/types.goadds aTuistruct withShowVCS *booland aShowVCSColumn()method that defaults totruefor backward compatibility;internal/render/tui/repostable/ui.goreplaces the old parallel column/row arrays with a declarativecolumnDefslice and aredistributeHiddenWidthhelper that reclaims space from hidden columns.internal/vcs/jj/jj_test.goreplaces a dependency on the/usr/bin/falsebinary withos.Args[0]so the "failing binary" test works cross-platform; the expected error substring is loosened from\"failed: exit status 1\"to\"failed:\"because the test binary exits with status 2 on unrecognized flags.Confidence Score: 5/5
Safe to merge — the change is additive, defaults preserve existing behavior, and all toggling logic is well-covered by tests.
The config defaulting path (nil ShowVCS → show column) is exercised by dedicated unit tests. The column/row alignment refactor uses a shared columnDef list, eliminating any header-cell drift. Width redistribution is tested for both the expand-column and last-column fallback paths. The jj test fix removes a Unix-only binary dependency without introducing flakiness. No regressions were identified across the changed files.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["config.Config\n(TOML / CLI flags)"] -->|"ShowVCSColumn()"| B["repostable.Options\n{ShowVCS bool}"] B --> C["repostable.New()\nrepostable.Model"] C --> D["activeColumnDefs(options)"] D -->|"ShowVCS == true"| E["5 columnDefs\nRepo, Branch, VCS, Stash, State"] D -->|"ShowVCS == false"| F["4 columnDefs\nRepo, Branch, Stash, State"] F --> G["redistributeHiddenWidth\n+VCSW% to expand col or last col"] E --> H["createColumns → []table.Column"] G --> H E --> I["createRows → []table.Row"] F --> I H --> J["bubbles/table render"] I --> JReviews (2): Last reviewed commit: "test(ui): cover VCS column review feedba..." | Re-trigger Greptile