Skip to content

feat(desktop): close and reopen focused browser tabs with shortcuts - #4836

Merged
reachjalil merged 1 commit into
devfrom
feature/browser-tab-shortcuts
Sep 10, 2026
Merged

reachjalil merged 1 commit into
devfrom
feature/browser-tab-shortcuts

Conversation

@reachjalil

Copy link
Copy Markdown
Member

Problem

Cmd+W currently closes the OpenWork window even when a built-in browser page has focus. Closing a page also leaves no way to reopen it from the keyboard.

Change

  • Route Cmd/Ctrl+W through the focused browser tab before the native Close Window action, including webpage, address-field, and tab-strip focus.
  • Reopen the same owner's most recently closed browser tab with Cmd/Ctrl+T. Keep the existing conversation-cycle shortcut outside browser focus.
  • Preserve immediate reopening after the last tab closes, suppress key-repeat closes, and keep unrelated conversations' pages intact.
  • Retain at most 20 URL-only history entries in memory. Reopening creates a fresh native target under current policy and capacity checks, without restoring task handles, permissions, form contents, or navigation history.
  • Clear browser context on outside focus, navigation, Tab/Escape, and owner cleanup; distinguish initial geometry staging from leaving the browser.

Existing suspended-tab behavior and native Close outside browser focus are unchanged.

Verification

Verdict: Incomplete — native runtime evidence is not yet available.

Candidate 0e26d4e61f10cd805880dd9c072a87ebee4afe21 is rebased onto dev@3f783066f9fa25f020a6cb1972d9c8ac3b9a1aec.

Passed on this head:

  • node --import ../browser-tab-shortcuts-test-resolver.mjs --test --test-reporter=dot apps/desktop/electron/browser-panel.test.mjs apps/desktop/electron/browser-shortcut-focus.test.mjs — exit 0; 79 passed, 0 failed, 0 skipped. The local resolver supplies this candidate's real browser-tabs module and an installed AJV dependency; Electron itself is a test double. In a normally installed workspace, omit the --import option.
  • node --check for browser-panel.mjs, main.mjs, app-menu.mjs, and preload.mjs — exit 0.
  • git diff --check origin/dev...HEAD — exit 0.

Not run: native macOS/Windows/Linux runtime verification, package build, and whole-app typechecks. The covering journey is evals/specs/browser-tabs-owned-by-thread.e2e.test.ts; its native shortcut assertion and exact-head runtime evidence remain missing. Target-scoped CDP key dispatch has not been counted as proof of Electron focus and accelerator ordering.

Native verification should check webpage and toolbar focus, closing the last tab then reopening, W while the reopened page loads, inactive tab-button focus, unchanged neighboring conversation pages, and ordinary conversation cycling from the composer.

Related work

#4111 (WebMCP) and #4328 (browser allowlist) overlap browser lifecycle files but do not implement these shortcuts. This change uses current dev's WebMCP lifecycle, policy enforcement, suspension, and zoom handling rather than restoring either older branch's implementation.

@mintlify

mintlify Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
differentai 🟢 Ready View Preview Sep 10, 2026, 7:21 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 7:22pm UTC
openwork-den Ready Ready Preview Sep 10, 2026 7:22pm UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 7:22pm UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 7:22pm UTC

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit 0e26d4e61f10cd805880dd9c072a87ebee4afe21 · selected evidence

Open review report

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (240334 ms), confidentiality-review (254796 ms), desktop-den-sync-review (313194 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (0e26d4e61f10cd805880dd9c072a87ebee4afe21). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

This branch was successfully deployed

5 active deployments
Preview – openwork-landing — 0e26d4e6 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — 0e26d4e6 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — 0e26d4e6 Deployed Sep 10, 2026 by vercel[bot]
staging - packages/docs — 0e26d4e6 Deployed Sep 10, 2026 by mintlify[bot]
Preview – openwork-diagnostics — 0e26d4e6 Deployed Sep 10, 2026 by vercel[bot]
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