Skip to content

refactor: isolate TUI startup resume state - #148

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

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

Conversation

@mohitranka

@mohitranka mohitranka commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • group startup resume-picker visibility and session identity into StartupResumeState
  • preserve startup resume selection and overlay behavior

Validation

  • cargo fmt --all -- --check
  • cargo test -p forge-tui --lib --locked
  • cargo clippy -p forge-tui --all-targets --locked -- -D warnings

Summary by CodeRabbit

  • Refactor
    • Consolidated startup resume information into a single internal state, improving consistency across startup picker actions and session restoration.
    • Preserved existing startup resume behavior while simplifying state management.

@github-actions
github-actions Bot enabled auto-merge (squash) August 2, 2026 11:37
@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: 0dd9f6cb-28de-49b6-9c15-a5e3607e7f83

📥 Commits

Reviewing files that changed from the base of the PR and between 2ce91da and eb9432f.

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

📝 Walkthrough

Walkthrough

The TUI replaces separate startup resume fields with StartupResumeState. Initialization, overlay actions, and resume-session cleanup now use its nested picker and session_id fields.

Changes

Startup resume state

Layer / File(s) Summary
Define and initialize startup resume state
crates/forge-tui/src/app/types.inc.rs, crates/forge-tui/src/app/new.rs
Adds StartupResumeState and stores it in TuiApp. Startup initialization creates the combined state.
Update startup resume consumers
crates/forge-tui/src/app/overlays.rs, crates/forge-tui/src/app/shell.rs
Overlay actions use startup_resume.picker. Resume-session cleanup uses startup_resume.session_id.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • NorviaLabs/forge#139: Refactors TuiApp runtime fields into dedicated state structs and updates initialization and access sites.
🚥 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 TUI startup resume 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-startup-resume-state

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

@github-actions
github-actions Bot merged commit f9de2e0 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