Skip to content

fix(desktop): preserve permission status when tab is focused#1465

Merged
Kitenite merged 1 commit into
mainfrom
kitenite/lingo
Feb 13, 2026
Merged

fix(desktop): preserve permission status when tab is focused#1465
Kitenite merged 1 commit into
mainfrom
kitenite/lingo

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 13, 2026

Summary

  • The "permission" pane status was being downgraded to "working" when the user clicked on or focused a tab
  • This caused the red permission indicator to disappear prematurely, before the user actually granted/denied the permission
  • Now the permission indicator persists until the agent resumes (Start event) or the terminal exits

Changes

  • apps/desktop/src/shared/tabs-types.ts: Removed the "permission" → "working" transition from acknowledgedStatus() so that focusing a tab no longer clears the permission indicator

Test Plan

  • Start an agent session that triggers a permission request
  • Click away from the tab, then click back — verify the red permission indicator persists
  • Grant or deny the permission — verify the indicator updates correctly (clears on agent resume or terminal exit)
  • Verify "review" status still clears to "idle" when focusing the tab

Summary by CodeRabbit

  • Bug Fixes
    • Fixed status handling to correctly preserve permission state during operations instead of converting it, ensuring proper state persistence.

Don't downgrade "permission" pane status to "idle" or "working" when
the user focuses a tab. The permission indicator should persist until
the agent actually resumes or the terminal exits.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

The acknowledgedStatus function is modified to preserve the "permission" status instead of converting it to "working". This behavioral change allows the permission status to persist until the agent resumes, rather than being mapped to a working state during acknowledgment.

Changes

Cohort / File(s) Summary
Status Handler Logic
apps/desktop/src/shared/tabs-types.ts
Modified acknowledgedStatus function to preserve "permission" status instead of mapping it to "working". Updated comment reflects that "permission" persists until agent resumes. Other status mappings ("review" → "idle") remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 Permission holds its ground today,
No more transformed to "working" way,
Until the agent takes its stand,
Status stays as once was planned! ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and concisely describes the main change: preserving permission status when a tab is focused, which is the core fix in this changeset.
Description check ✅ Passed The description covers the problem statement, specific changes made, and a comprehensive test plan, mostly aligning with the template's intent despite not following exact section headings.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/lingo

No actionable comments were generated in the recent review. 🎉


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

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

@Kitenite Kitenite merged commit adf55c6 into main Feb 13, 2026
5 of 6 checks passed
@Kitenite Kitenite deleted the kitenite/lingo branch February 13, 2026 20:45
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app
  • ⚠️ Streams Fly.io app

Thank you for your contribution! 🎉

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