Skip to content

perf(ctx): skip hidden bufnr validation#2718

Merged
ibhagwan merged 1 commit into
mainfrom
perf/ctx_hidden
May 3, 2026
Merged

perf(ctx): skip hidden bufnr validation#2718
ibhagwan merged 1 commit into
mainfrom
perf/ctx_hidden

Conversation

@ibhagwan

@ibhagwan ibhagwan commented May 3, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where session state could become stale when resuming operations with the interface hidden.

@coderabbitai

coderabbitai Bot commented May 3, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c494de3a-01e9-47c5-b08a-437b0ce98287

📥 Commits

Reviewing files that changed from the base of the PR and between 9b382a9 and ec8b3b2.

📒 Files selected for processing (1)
  • lua/fzf-lua/ctx.lua

📝 Walkthrough

Walkthrough

The M.refresh function's guard logic in ctx.lua is refined to allow context re-initialization when a hidden fzf buffer resume state exists (winobj._hidden_fzf_bufnr), preventing stale context in scenarios where the fzf job is resumed but the UI is not immediately visible.

Changes

Context Refresh Guard Logic

Layer / File(s) Summary
Guard Condition Update
lua/fzf-lua/ctx.lua
The M.refresh function's conditional that gates context re-initialization now includes an additional or winobj._hidden_fzf_bufnr clause, allowing the stored context to refresh when resuming from a hidden fzf buffer state, alongside the existing hidden/was-hidden checks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A context refresh, so clean and bright,
When hidden buffers see the light,
No staleness now when fzf returns,
The guard clause guards as logic turns,
Resume with grace, the state stays true! ✨

🚥 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 'perf(ctx): skip hidden bufnr validation' accurately describes the main change: updating guard logic to skip validation in scenarios with hidden fzf buffer 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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 perf/ctx_hidden

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 4/8 reviews remaining, refill in 28 minutes and 14 seconds.

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

@ibhagwan ibhagwan force-pushed the perf/ctx_hidden branch 2 times, most recently from 55b78c3 to 78d7c5a Compare May 3, 2026 16:52
@ibhagwan ibhagwan force-pushed the perf/ctx_hidden branch from 78d7c5a to ec8b3b2 Compare May 3, 2026 16:52
@ibhagwan ibhagwan merged commit 6459041 into main May 3, 2026
10 checks passed
@ibhagwan ibhagwan deleted the perf/ctx_hidden branch May 3, 2026 16:55
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