Skip to content

feat(trees): add Vue adapter#652

Open
onmax wants to merge 1 commit into
pierrecomputer:mainfrom
onmax:codex/add-vue-trees
Open

feat(trees): add Vue adapter#652
onmax wants to merge 1 commit into
pierrecomputer:mainfrom
onmax:codex/add-vue-trees

Conversation

@onmax
Copy link
Copy Markdown

@onmax onmax commented May 7, 2026

Description

Adds first-class Vue 3 support for @pierre/trees through the new @pierre/trees/vue entrypoint. The adapter includes a Vue component, composables for selection and search state, SSR handoff through preloadedData, and a Vue browser fixture.

The Trees docs now include Vue getting started and API pages alongside React and vanilla, plus updates to the integration and SSR guides.

Motivation & Context

Vue users can now adopt Trees without using the React wrapper or dropping down to the vanilla API. The adapter keeps the existing imperative FileTree model as the shared contract, so core renderer behavior stays aligned across integrations.

Planning to add support in Reka UI and Nuxt UI upstream as well :)

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality). You must have
    first discussed with the dev team and they should be aware that this PR is
    being opened
  • Breaking change (fix or feature that would change existing functionality).
    You must have first discussed with the dev team and they should be aware
    that this PR is being opened
  • Documentation update

How was AI used in generating this PR

Codex helped implement the Vue adapter, docs, tests, and review fixes under my direction. Also used codex to create a project inside /tmp and verify everythign works in a brand-new project using @Browser use and tweak things.

Related issues

None.

PS: I know this have a high cost for maintenance, but the other route I can think of is moving this code to Reka UI and support there instead. I am also planning to add a PR to add diffs support. Let me know what works for you. Thanks!

@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

@onmax is attempting to deploy a commit to the Pierre Computer Company Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedvue@​3.5.341001009196100

View full report

@onmax onmax marked this pull request as ready for review May 7, 2026 08:37
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85b356f3c2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +222 to +227
if (this.shouldRenderPreloadedTemplate && this.preloadedData != null) {
children.push(
h('template', {
innerHTML: this.preloadedData.shadowHtml,
shadowrootmode: 'open',
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Gate declarative shadow template to SSR-only renders

preloadedData currently always pushes a <template shadowrootmode="open"> vnode during client renders, but declarative shadow DOM only attaches when the HTML parser sees that template in server markup. When this node is created via Vue on the client, hasExistingPreloadedContent() can still detect the template and route to hydrate(), even though no parser-created shadow tree exists, which can cause hydration against non-preloaded DOM (or avoidable mismatch/recovery work). The React adapter avoids this by rendering the preload template only when window is undefined, so Vue should apply the same SSR-only guard.

Useful? React with 👍 / 👎.

@onmax onmax mentioned this pull request May 7, 2026
5 tasks
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