Skip to content

fix: preserve active output tab across compilation errors#36

Merged
sxzz merged 1 commit intomainfrom
sxzz/fix-share-url
Jan 30, 2026
Merged

fix: preserve active output tab across compilation errors#36
sxzz merged 1 commit intomainfrom
sxzz/fix-share-url

Conversation

@sxzz
Copy link
Copy Markdown
Member

@sxzz sxzz commented Jan 30, 2026

Summary

  • Lift active output tab state from Tabs component to OutputContainer via v-model so it persists across error/success cycles

Problem

When a compilation error occurs, the Tabs component is unmounted (replaced by the error display). On the next successful compilation, Tabs remounts fresh and defaults to tabs[0] (index.js), losing the user's tab selection.

Fix

Added a ref<string>() in OutputContainer.vue and bound it to the Tabs component via v-model. The existing watch in Tabs.vue already handles resetting to tabs[0] when the active tab no longer exists in the output.

Closes #26

Lift the active tab state from the Tabs component to OutputContainer
via v-model so it persists when the Tabs component unmounts during
error display and remounts on successful recompilation.

Closes #26
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 30, 2026

Deploy Preview for rolldown-repl ready!

Name Link
🔨 Latest commit 4403855
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-repl/deploys/697bf6be54be72000887b1c4
😎 Deploy Preview https://deploy-preview-36--rolldown-repl.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sxzz sxzz merged commit 8d952a1 into main Jan 30, 2026
4 checks passed
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.

bug: after recompiling, the current open tab is closed if an error occured in between

1 participant