Skip to content

fix(workspace): restore DevTools UI when returning to workspace - #1584

Closed
BillionClaw wants to merge 1 commit into
manaflow-ai:mainfrom
BillionClaw:clawoss/fix/1494-workspace-switch-devtools-blank
Closed

BillionClaw wants to merge 1 commit into
manaflow-ai:mainfrom
BillionClaw:clawoss/fix/1494-workspace-switch-devtools-blank

Conversation

@BillionClaw

@BillionClaw BillionClaw commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixed an issue where the DevTools panel would display blank after switching workspaces and returning to a workspace with DevTools open.

What changed:

  • Added a call to restoreDeveloperToolsAfterAttachIfNeeded() in reconcileBrowserPortalVisibilityForCurrentRenderedLayout() when a browser panel becomes visible

Why:
When switching workspaces, the browser portal is hidden via hideAllBrowserPortalViews(). When returning to the workspace, reconcileBrowserPortalVisibilityForCurrentRenderedLayout() makes the portal visible again, but DevTools was not being restored, causing a blank panel.

Testing

  • Verified the fix compiles successfully with swift build
  • The change is minimal (3 lines) and targeted to the specific issue
  • The fix follows the existing pattern used elsewhere in the codebase (e.g., BrowserPanelView calls the same method during view updates)

Checklist

  • I tested the change locally (build verification)
  • I added or updated tests for behavior changes (N/A - UI state restoration)
  • I updated docs/changelog if needed (N/A - minor bug fix)

Fixes #1494


Summary by cubic

Fix blank DevTools panel when returning to a workspace after switching. DevTools are restored when the browser portal becomes visible again.

  • Bug Fixes
    • Call restoreDeveloperToolsAfterAttachIfNeeded() in reconcileBrowserPortalVisibilityForCurrentRenderedLayout() when a browser panel becomes visible.

Written for commit 529f7dc. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where developer tools state was not properly restored when switching workspace visibility.

When switching workspaces with DevTools open, returning to the original
workspace caused the DevTools panel to display blank. This happened
because the DevTools restoration logic was not triggered when the
browser portal became visible again after a workspace switch.

Call restoreDeveloperToolsAfterAttachIfNeeded() when reconciling
browser portal visibility for visible panels. This ensures DevTools
is properly restored when a workspace with open DevTools becomes
visible again.

Fixes manaflow-ai#1494
@vercel

vercel Bot commented Mar 17, 2026

Copy link
Copy Markdown

@BillionClaw is attempting to deploy a commit to the Manaflow Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps greptile-apps 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.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Mar 17, 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: f10b01eb-4083-4aee-a34d-bd81eb2891e1

📥 Commits

Reviewing files that changed from the base of the PR and between 1604ff4 and 529f7dc.

📒 Files selected for processing (1)
  • Sources/Workspace.swift

📝 Walkthrough

Walkthrough

The change adds a call to restore DevTools state within browser portal visibility handling in the Workspace module. When a browser panel becomes visible after workspace transitions, the DevTools UI restoration is invoked post-refresh and anchor operations, addressing the blank DevTools panel issue during workspace switches.

Changes

Cohort / File(s) Summary
DevTools Restoration in Workspace Visibility Handling
Sources/Workspace.swift
Adds restoreDeveloperToolsAfterAttachIfNeeded() call to BrowserPanel visibility handler to restore DevTools state after workspace visibility changes and anchor rebinding.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 A curious rabbit hops through workspaces wide,
DevTools now stay, no longer to hide,
When switching back home with a mystical leap,
The debugging tools their state proudly keep! 🛠️✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately describes the main change: restoring DevTools UI when returning to a workspace, which directly addresses the bug fix in the PR.
Description check ✅ Passed The description covers the required sections with clear explanations of what changed and why, though testing verification is build-only rather than comprehensive manual testing.
Linked Issues check ✅ Passed The PR successfully addresses the requirements from issue #1494 by restoring DevTools UI when returning to a workspace after switching, matching the expected behavior.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the specific DevTools restoration issue described in #1494; no unrelated modifications are present.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

@BillionClaw

Copy link
Copy Markdown
Contributor Author

Closing per repository blocklist: maintainer threatened to ban. All submissions to this repo have been suspended.

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.

Workspace switch breaks DevTools UI when returning with DevTools open

1 participant