Skip to content

refactor: isolate TUI footer limit state - #140

Merged
github-actions[bot] merged 1 commit into
mainfrom
refactor/tui-cache-state
Aug 2, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
refactor/tui-cache-state

Conversation

@mohitranka

@mohitranka mohitranka commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Group footer-limit cache and refresh-channel ownership into FooterLimitsState.
  • Preserve provider-limit refresh behavior and render-path access.

Validation

  • cargo fmt --all -- --check
  • cargo clippy -p forge-tui --all-targets --locked -- -D warnings
  • git diff --check
  • Focused footer/cache tests pass individually.

Summary by CodeRabbit

  • Refactor
    • Improved internal management of footer limit refresh state.
    • Preserved existing footer limit caching and refresh behavior while simplifying state handling.

@github-actions
github-actions Bot enabled auto-merge (squash) August 2, 2026 11:01
@coderabbitai

coderabbitai Bot commented Aug 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 03178f87-befd-46ae-af49-e9dd6d33ca94

📥 Commits

Reviewing files that changed from the base of the PR and between 194280b and e53d27f.

📒 Files selected for processing (3)
  • crates/forge-tui/src/app/chrome.rs
  • crates/forge-tui/src/app/new.rs
  • crates/forge-tui/src/app/types.inc.rs

📝 Walkthrough

Walkthrough

The TUI groups the footer-limit cache and refresh receiver into FooterLimitsState. Initialization and refresh logic now use the nested state without changing refresh or expiration behavior.

Changes

Footer limits state

Layer / File(s) Summary
State definition and initialization
crates/forge-tui/src/app/types.inc.rs, crates/forge-tui/src/app/new.rs
FooterLimitsState groups the cache and refresh receiver. TuiApp initializes and stores this nested state.
Refresh state usage
crates/forge-tui/src/app/chrome.rs
Footer-limit refresh handling, cache lookup, in-flight checks, and receiver storage use self.footer_limits.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: grouping and isolating TUI footer limit state.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/tui-cache-state

Comment @coderabbitai help to get the list of available commands.

@github-actions
github-actions Bot merged commit 178247a into main Aug 2, 2026
6 checks passed
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.

1 participant