fix(tui): let Overview scroll through all models#484
Open
IvGolovach wants to merge 1 commit intojunhoyeo:mainfrom
Open
fix(tui): let Overview scroll through all models#484IvGolovach wants to merge 1 commit intojunhoyeo:mainfrom
IvGolovach wants to merge 1 commit intojunhoyeo:mainfrom
Conversation
Keep TUI list capacity owned by the active renderer so redraws do not clamp scroll state against a full-terminal height estimate before the tab computes its real page size. Validation - cargo fmt --all -- --check: PASS - bash scripts/check-version-coherence.sh: PASS - cargo test -p tokscale-cli tui::app::tests: PASS, 70 passed, 1 ignored - docker run --rm ... rust:1.95 cargo clippy --workspace --all-features -- -D warnings: PASS - cargo test --workspace --all-features -- --format terse: PASS, 1127 passed, 2 ignored - git diff --check: PASS Rollback - git revert HEAD
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
1. Summary
Fixes the Overview tab scroll range so large model lists can scroll all the way to the final rows after redraws or resize events.
Closes #481.
2. Why
The Overview tab renders each model as a two-line row, but the shared resize path was clamping
scroll_offsetagainst a full-terminal item estimate before Overview recalculated its real page size. That made lists with many models stop after only the first few scroll ranges.3. Diff scope
Touched TUI scroll-capacity ownership only:
crates/tokscale-cli/src/tui/app.rscrates/tokscale-cli/src/tui/ui/overview.rscrates/tokscale-cli/src/tui/ui/models.rscrates/tokscale-cli/src/tui/ui/daily.rscrates/tokscale-cli/src/tui/ui/hourly.rscrates/tokscale-cli/src/tui/ui/agents.rsThe active renderer now sets the actual visible item capacity through
App::set_max_visible_items(), which clamps selection and scroll state using the rendered panel height rather than a generic terminal-height estimate.4. Branch integrity
mainorigin/mainSHA:edc8ed1fca49ec4a6936e4d4e15ca45dfd442b8e1, behind0edc8ed1fca49ec4a6936e4d4e15ca45dfd442b8eorigin/mainis an ancestor of this branch; no divergence detected.5. Commit integrity
Commit introduced by this PR:
scripts/ledger/does not exist in this repository.scripts/ledger/does not exist in this repository.6. Ledger proof
Not applicable —
scripts/ledger/does not exist in this repository.7. Diff hygiene
git diff --check origin/main...HEAD: PASS, no output.Forbidden-file confirmation:
.envfiles.ops/reports/**artifacts.__pycache__/,*.pyc,.DS_Store,.coverage,htmlcov/, orcoverage.xml.8. Test proof
Regression test added:
test_overview_scroll_keeps_rendered_capacity_after_resizeValidation run:
Total: 1,127 passed, 2 ignored.
9. Verification-pack proof
Not applicable — no infra/governance/replay/invariant/verification files changed.
10. Migration notes
Not applicable — no DB migration changed.
11. CI context confirmation
CI context names unchanged.
Not applicable — no CI/workflow context changes.
12. Runtime safety
Reviewed runtime files/modules:
crates/tokscale-cli/src/tui/app.rsoverview.rs,models.rs,daily.rs,hourly.rs,agents.rsRuntime reasoning:
clamp_selection()path.13. Documentation integrity
Not applicable — no docs/runbooks/commands changed.
14. Rollback plan
Use the final merged commit SHA after merge:
Replace
<post_merge_commit_sha>with the final squash/merge commit SHA after merge.15. Known residual risks
No known residual risks.