collab: make mid-session "+ Add repo" a real popup dialog (fix iframe flicker)#63
Merged
Merged
Conversation
… flicker) The "+ Add" control rendered the repo picker inline in the side panel and fetched /collab/repos via createResource — which suspends the page-level <Suspense> boundary, so the whole session (iframe included) dropped to the app loading screen while the list loaded, then snapped back with the picker tucked into the panel where it was easy to miss. Users reported "the iframe disappears, loading screen, then returns — no dialog to pick repos." Replace it with AddRepoDialog: a centered modal overlay (mirrors InviteDialog — fixed inset-0, z-index above the iframe, click-outside to close) that fetches the repo list in onMount with a plain signal (NOT createResource), so it can never suspend the page. The iframe is hidden via visibility:hidden while the dialog is open (iframes ignore z-index and bleed through), the same trick the invite dialog already uses. The dialog lists every org repo with checkboxes, excludes ones already linked, and on "Add" calls collab.addRepos — surfacing any branch-collision warnings inline and closing on a clean add. EmptyReposPanel's inline RepoPicker (the 0-repo recovery flow, which replaces the iframe anyway) is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the user-reported bug: clicking + Add on a running session made the iframe vanish to the app loading screen and then return, with no dialog to pick repos.
Root cause
The
+ Addcontrol rendered the repo picker inline in the side panel and fetched/collab/reposviacreateResource.createResourceintegrates with Solid's<Suspense>, so while the list was in flight it suspended the page-level Suspense boundary — dropping the entire session (iframe included) to the app loading icon, then snapping back with the picker tucked into the panel where it was easy to miss. Not the popup behaviour expected.Fix
New
AddRepoDialog— a centered modal overlay that mirrors the existingInviteDialog:fixed inset-0, z-index above the iframe, click-outside to close.onMountwith a plain signal (notcreateResource), so it can never suspend the page.visibility:hiddenwhile the dialog is open — iframes promote themselves to their own compositing layer and bleed through z-index, the same trickInviteDialogalready uses.collab.addRepos— surfacing any branch-collision warnings inline and closing on a clean add.EmptyReposPanel's inlineRepoPicker(the 0-repo recovery flow, which replaces the iframe entirely so suspension is harmless) is unchanged.Files
packages/app/src/components/collab/AddRepoDialog.tsx— new modalpackages/app/src/pages/collab/session.tsx— render the dialog as an overlay; hide the iframe while open; drop the inline pickerVerification (post-deploy)
As a Driver on a running multi-repo session, click + Add → a centered popup lists the org repos (already-linked ones excluded), the iframe stays put behind the dim overlay (no loading-screen flicker), ticking + Add clones the repo onto the collab branch and closes; collision case shows an amber warning and stays open.
🤖 Generated with Claude Code