Repository navigation
fix(app): unwrap store proxy before Skill Hub install IPC - #335
Merged
Merged
Conversation
The install dialog passed state.agents — a SolidJS store's reactive Proxy — into ipcRenderer.invoke, whose structured clone rejects proxies with "An object could not be cloned". The rejection happened at the IPC layer, below the controller's result-union error handling, so nothing reset the dialog and it hung on "Installing" forever. Copy the agents into a plain array at the call site. The browse and detail calls already pass plain objects and strings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
src/app.tsx and src/component/dialog-configure.tsx import @codev/upload/nudge and /spawn (since #312) but the package never declared the dependency, so bun never linked it into packages/tui/node_modules and `bun typecheck` failed with TS2307 on any machine where hoisting didn't happen to cover it — which also blocked every push through the pre-push hook's repo-wide typecheck. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Install failures reused the browse page's "Something went wrong loading the Skill Hub" copy, and an expired-session failure gave no hint that signing in again is the remedy. Map the auth code to a re-login hint and other failures to install-specific copy (en/es/vi). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
An expired or missing SkillHub session surfaced as an error telling the user to run `codevhub login` in a terminal, even though the desktop app already owns a browser SSO flow (the gateway configure gate) that writes the same shared auth file every hub request reads. When an install fails with the auth code, the dialog now shows a Sign in button that runs `gatewaySso.startLogin()` — silent refresh first, full browser loopback otherwise — then retries the install automatically. A signing-in phase shows a loader with a cancel that aborts the attempt. The auth error copy drops the terminal hint in all three locales. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Vite's dep scanner does not crawl `?worker&url` entries, so the markdown worker's deps (@shikijs/stream, katex, marked, marked-shiki, remend, shiki) were only discovered on the first markdown render — a mid-session re-optimize that full-page reloads the dev app, resetting e.g. a Skill Hub search as its results rendered. Scan the worker as an extra optimizeDeps entry so they are bundled at startup instead. Co-Authored-By: Claude Fable 5 <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.
Summary
Installing a skill from the desktop Skill Hub hung on "Installing" forever, with
Uncaught (in promise) Error: An object could not be clonedin the console.The install dialog passed
state.agents— a SolidJS store's reactive Proxy — intoskillhub.install(...), which lands inipcRenderer.invoke("skillhub-install", ...). Electron structured-clones invoke arguments, and the structured-clone algorithm rejects proxies, so the request never left the renderer. The rejection happened at the IPC layer, below the main-process controller's result-union error handling, so nothing reset the dialog phase.Fix: copy the agents into a plain array at the call site (
agents: [...state.agents]), with a comment recording the clone constraint. ThebrowseanddetailIPC calls already pass plain objects and strings, so this was the only affected path.Follow-up commits:
packages/tuiimports@codev/upload/nudgeand/spawn(since feat: nudge for a fresh sign-in when session uploads stall #312) but never declared the dependency, sobun typecheckfailed with TS2307 wherever hoisting didn't cover it — including the pre-push hook, which blocked pushing this branch.GET /api/v1/skills/:id/downloadcurrently 500s for all skills; that is not addressable from this repo.)codevhub loginin a terminal". The dialog now shows a Sign in button on the auth error code that runs the existinggatewaySso.startLogin()browser flow (which writes the shared~/.codev/auth.jsonevery hub request reads) and retries the install automatically, with a cancellable signing-in phase.No DIVERGENCES changes — the app files are fork-only, and the tui manifest change restores a dependency the fork's own code already requires. CHANGELOG's unreleased Skill Hub entry extended with the in-app sign-in.
Testing
bun turbo typecheckpasses (via the pre-push hook; previously failed in@opencode-ai/tui).bun test src/skillhubinpackages/apppasses.🤖 Generated with Claude Code