Repository navigation
feat(electron): restore plugin management and Git sidebar after 0.1.5-rc.2 - #92
Conversation
…atalog-foundation feat(subagent): record and observe parent-owned child catalogs
feat(web): add panellist to left-sidebar
fix(web): move client dependencies to devDependencies
feat(web): declare workspace deliveries and open source files
….1.5-rc.1 release: dsh@0.1.5-rc.1
Backport the selected changes from PR #3928 and PR #3902 onto dsh-v0.1.5-rc.1, retaining baseline session recordings and excluding newer master commits. Refs #3927 Refs #3903 Co-authored-by: LegGasai <jyc132780208@sina.com>
…-backport-feedback-deliverables feat(web): backport feedback and file refinements to 0.1.5
….1.5-rc.2 release(dsh): 0.1.5-rc.2
Disable the scheduled master merge so the 139-commit post-tag HEAD cannot land during the harness migration.
Pin harness packages to fb2c4b9 while keeping the Electron shell, Git plugin, and release channels.
Upstream removed the Client details slot, so composing dsh-plugin-git fails Host load and typecheck. Keep the subtree and drop it from ecosystemPlugins instead of porting to Sidebar.
Upstream rc.2 dropped the Client details slot, so mounting Details Host fails Host load. Leave both trees under runtime/plugins, drop the directory picker shellDetails inject, and keep Theme Studio plus loopback dsh web.
This fork cannot condense root AGENTS.md, so the budget gate skips it. Point leftover Agent Note links at live owners and bring the ecosystem plugin README under the Summary limit.
The 0.1.5-rc.2 pin removed the Client details slot, so this subtree injects sidebarRight instead of depending on Details Host. DSH documentation and lint gates skip the package because it owns its own bilingual docs and lint.
Write a pending marker and take the web profile PID lock around dsh plugin, then reconcile read-only at startup. Failed pending, catalog, or Host-ready paths open a Main-owned recovery window instead of loading a dead Host.
Treat a healthy runtime-plugin as manageable without profileManaged so the Installed tab can enable, disable, and remove CLI installs. Keep profileManaged as desktopInstalled source accounting only.
Mount the Installed tab on settings.plugins.tab and restore Git as an ecosystem plugin now that the client injects sidebarRight. Details Host stays unmounted because upstream still has no details slot.
…osition Record pending/lock startup, CLI-installed runtime-plugin manageability, empty-install failure, Plugin Manager remount, and Git sidebar composition in the Electron lifecycle docs.
The host aggregate now typechecks this subtree, and matchAll capture groups are string | undefined.
Reference the Git host and client projects so source still typechecks, but exclude packages/dsh-electron/** so subtree tests are not compiled against DSH Client fakes.
…nection from root Mirrors the standalone dsh-plugin-git fix: the nested inject(['connection']) fiber could not see the sibling webServer row, so rpc.handle died with 'cannot get property "webServer" without inject', the /git channel never registered, and all client requests fell through to the SPA fallback as 405. Declare webServer in the dependency list and read the service off ctx.root.
|
@codex Review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8403b497f
ℹ️ 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".
| void stopHarness(child).then( | ||
| () => { reject(timeoutError) }, | ||
| (cleanupError: unknown) => { | ||
| reject(new AggregateError( | ||
| [timeoutError, cleanupError], | ||
| `${timeoutError.message} Harness shutdown also failed.`, | ||
| )) | ||
| console.error('desktop recovery: Harness shutdown after startup timeout failed', cleanupError) | ||
| reject(timeoutError) |
There was a problem hiding this comment.
Do not retry before the timed-out Host is stopped
When stopHarness(child) rejects, this branch discards the cleanup failure and still reports a recoverable host-timeout; retryAfterPluginRecovery subsequently spawns another Host even though the first child has not been proven to exit. Preserve the shutdown failure as non-retryable, or wait for the original child to reach quiescence before offering a retry.
AGENTS.md reference: AGENTS.md:L137-L139
Useful? React with 👍 / 👎.
| async () => { | ||
| const repaired = await catalog.list() | ||
| await composition.apply(effectivePluginRoster(repaired, loadPluginState(overlay.pluginStatePath).state)) | ||
| }, |
There was a problem hiding this comment.
Reload lifecycle state after startup recovery
When Host startup times out and the user chooses Disable All or Reset Management, this callback reloads the repaired state only for the generated composition; the later PluginLifecycleController still receives the pre-recovery reconciled.state. Its catalog then reports the wrong desiredEnabled values, and subsequent enable/disable operations can no-op or persist the stale preferences. Reload and reconcile the state used to construct the controller after recovery succeeds.
AGENTS.md reference: AGENTS.md:L137-L139
Useful? React with 👍 / 👎.
| await savePluginState(options.statePath, state) | ||
| await new DynamicIncludeCompositionBackend(options.configPath).apply(effectivePluginRoster(plugins, state)) | ||
| await clearPluginPending(options.pendingPath) |
There was a problem hiding this comment.
Keep recovery actions behind the profile lock
If startup reaches lock-timeout because an orphaned dsh plugin child is still alive, Disable All clears the pending marker here without acquiring the profile lock; Reset Management does the same below. Startup then proceeds and can launch Host while that child is still mutating the profile. These repair actions must wait for ownership or explicitly terminate and reap the live owner before clearing the marker.
AGENTS.md reference: AGENTS.md:L137-L139
Useful? React with 👍 / 👎.
| @@ -426,12 +431,66 @@ if (!primaryInstance) { | |||
| 'web', | |||
| () => loadPluginState(overlay.pluginStatePath).state, | |||
| ) | |||
| const catalogPlugins = await catalog.list() | |||
| ensureWebProfileWorkspace(webProfileDir(harnessHome)) | |||
There was a problem hiding this comment.
Acquire the profile lock before rewriting workspace policy
On a restart with a pending Desktop mutation whose child is still running, this call can truncate and rewrite the same profile's pnpm-workspace.yaml before reconcilePendingPackageMutation attempts to acquire the lock. That races pnpm's active transaction and defeats the serialization added by this change; move this write until after pending reconciliation owns or releases the profile lock.
AGENTS.md reference: AGENTS.md:L137-L139
Useful? React with 👍 / 👎.
| if (!/^allowBuilds:/m.test(next)) { | ||
| next += renderAllowBuilds(WEB_PROFILE_ALLOW_BUILDS) | ||
| return next | ||
| } | ||
| return insertMissingAllowBuilds(next, WEB_PROFILE_ALLOW_BUILDS) |
There was a problem hiding this comment.
Merge policy into inline allowBuilds maps
For a valid user workspace such as allowBuilds: { esbuild: true }, the first regex treats allowBuilds as present, but insertMissingAllowBuilds only replaces a line containing exactly allowBuilds: and therefore adds none of the remaining reviewed entries. With strictDepBuilds enabled, installs that need those entries are then rejected even though this function promises to merge the Desktop seed without dropping user configuration; parse and update the YAML value rather than assuming block-map formatting.
Useful? React with 👍 / 👎.
Upstream 0.1.5-rc.2 removed the Client details slot and the ILayout.openDetails/closeDetails API, so the unmounted runtime/plugins/ui-details-host mirror no longer type-checks against workspace types; CI fails on tsconfig.runtime-client.json while a local nested 0.1.2-rc.1 node_modules hides the breakage. Remove the mirror, its dedicated tests, the client path alias, Plugin Manager display name, and every documentation reference; Theme Studio remains the only member of the Electron-required portable UI infrastructure category. New Agent Note consolidates and deletes the Details Host unmount note. Retarget the automatic-JSX artifact coverage to the Plugin Manager bundle and fix the four oxlint errors this branch had introduced behind the typecheck failure. Refs #92
commented
Sep 14, 2026
|
@codex Review |
left a comment
There was a problem hiding this comment.
💡 Codex Review
https://github.com/cherrchen/deepseek-harness-electron/blob/7583a3371dfab66a3c2f45836013c17546da3828/apps/electron/src/plugin-install.ts#L500
Hand the profile lock to the rollback subprocess
When a Git or local install resolves to a Desktop-reserved package name, this automatic rollback starts a second dsh plugin child without the onSpawn owner handoff used by the primary command. If Main crashes during that removal, the child can remain alive while the lock still names the dead Main PID, so the next Desktop instance recycles the lock and reconciles or starts Host concurrently with the rollback mutation. Record the rollback child PID for its lifetime and restore Main ownership after it closes.
AGENTS.md reference: AGENTS.md:L137-L139
ℹ️ 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".
| @@ -97,11 +98,12 @@ export class ProfilePluginCatalog implements PluginCatalog { | |||
| kind, | |||
| installSource, | |||
| requestedSpec, | |||
| manageable: activationMode === 'hot' && health === 'healthy' && managedRuntime, | |||
| manageable: activationMode === 'hot' && health === 'healthy', | |||
There was a problem hiding this comment.
Keep plain CLI dependencies out of the runtime roster
When the web profile contains a CLI-installed plain dependency with a normal main or root exports entry, inspectProfilePackageState() classifies it as a runtime-plugin; making every such healthy entry manageable now adds it to effectivePluginRoster() at startup. Electron will therefore try to Cordis-load ordinary libraries that the CLI deliberately retained as plain dependencies, which can make Host startup fail. Require an explicit plugin discriminator or preserve an intent gate instead of treating every importable package as a hot plugin.
Useful? React with 👍 / 👎.
| const loaded = loadPluginState(options.statePath).state | ||
| const disabled = [...new Set([ | ||
| ...loaded.disabled, | ||
| ...plugins.filter(plugin => plugin.manageable).map(plugin => plugin.name), |
There was a problem hiding this comment.
Disable broken profile bundles during startup recovery
When an interrupted update leaves a profile bundle unloadable, the catalog marks that bundle profile-restart and manageable: false, so this filter never disables it; effectivePluginRoster() also controls only hot plugins and does not remove the bundle from dsh.profile.bundles. The action then clears the pending marker and retries Host with the same broken bundle, while Reset Management likewise preserves the bundle list, leaving both advertised recovery paths unable to restore startup. Recovery must exclude or repair affected profile bundles before clearing the marker.
AGENTS.md reference: AGENTS.md:L137-L139
Useful? React with 👍 / 👎.
Summary
0.1.5-rc.2pin on Electron downstream (upstream removed the Clientdetailsslot).dsh pluginmutations with a pending marker, web-profile PID lock, and Main-owned recovery window instead of starting a dead Host.runtime-plugins as manageable withoutprofileManaged; keep that list as Desktop install accounting only.settings.plugins.taband compose Git throughsidebarRight. Details Host stays unmounted.Test plan
cd apps/electron && CI=true pnpm run testcd packages/dsh-electron/dsh-plugin-git && CI=true pnpm run testpnpm run test:docs(Git subtree is excluded from DSH doc gates)apps/cliandpackages/bootstay unmodified