fix(comments): recreate comment editor on Activity tab remount - #63505
Open
jospoortvliet wants to merge 1 commit into
Open
fix(comments): recreate comment editor on Activity tab remount#63505jospoortvliet wants to merge 1 commit into
jospoortvliet wants to merge 1 commit into
Conversation
…ment editor The comment editor Vue app instance was kept in a closure variable and reused across Activity tab mount/unmount cycles. unmount() destroyed the app via app.unmount() but never reset the variable, so the next mount() skipped creating a new app and called mount() on an already- destroyed instance — a silent no-op. This made the comment field disappear after leaving and returning to the Activity tab, only recoverable via a full page reload. Reset `app` to undefined after unmounting so the editor is recreated on the next mount. Fixes #63487 Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Jos Poortvliet <jospoortvliet@gmail.com>
jospoortvliet
requested review from
kristian-zendato,
skjnldsv and
sorbaugh
and removed request for
a team
August 23, 2026 14:16
8 tasks
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.
Summary
Fixes #63487
The comment field at the top of the Activity/Comments sidebar tab disappeared after switching away and back, and only came back after a full page reload.
Root cause
apps/comments/src/comments-activity-tab.tsmounts the comment editor into the Activity sidebar'sregisterSidebarAction. The Vueappinstance is stored in a closure variable and intended to be reused across mount/unmount cycles (switching tabs).unmount()callsapp.unmount(), destroying the instance, but never clears the variable. On the nextmount(), the (still truthy)appcheck prevents a new instance from being created, and.mount(el)is called on an already-destroyed Vue app — which is a no-op. Reloading the page resets module state, which is why that "fixed" it.Confirmed this only affects the Activity-integrated path: with the Activity app disabled, the plain "Comments" tab (a separate
defineCustomElement-based mount inFilesSidebarTab.vue) is unaffected.Fix
Reset
app = undefinedafterapp?.unmount()so the nextmount()call recreates the Vue app instance instead of reusing a dead one.Test plan
Assisted-by: Claude:claude-sonnet-5
Checklist
3. to review, feature component)stable32)AI (if applicable)