For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Keep feedback submission available when an SSH workspace session is connecting or disconnected by wiring FeedbackHost to the renderer's base feedback service.
Architecture: Root remains the authority for the startup/base IServiceAccessor and passes its feedbackService explicitly through RootWorkspaceContent into App. Workspace-scoped services continue to drive file, task, terminal, Git, Agent, and session behavior; the disconnected remote proxy remains unchanged.
Tech Stack: TypeScript, React, Vitest, Electron renderer service accessors.
docs/superpowers/specs/2026-07-12-feedback-base-service-boundary-design.md.ZCODE_REMOTE_WORKSPACE_DISCONNECTED proxy or allow remote workspace calls to fall back to local file/task services.desktop-continuous and mobile web-remote-replayable boundaries.pnpm typecheck and pnpm lint before completion.Files:
packages/ui/test/feedbackBaseServiceBoundary.test.tsInterfaces:
RootProps.services: IServiceAccessor, RootWorkspaceContent, App, and FeedbackHost.Produces: a source-level boundary guard that fails until the base feedback service is passed independently of workspace-scoped services.
[ ] Step 1: Write the failing test
import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
function readSource(path: string): string {
return readFileSync(path, "utf8");
}
describe("feedback base service boundary", () => {
it("keeps feedback on the base service when workspace services are disconnected", () => {
const rootSource = readSource("packages/ui/src/Root.tsx");
const rootWorkspaceContentSource = readSource(
"packages/ui/src/root/RootWorkspaceContent.tsx",
);
const appSource = readSource("packages/ui/src/App.tsx");
expect(rootSource).toContain(
"baseFeedbackService={services.feedbackService}",
);
expect(rootWorkspaceContentSource).toContain(
"baseFeedbackService={baseFeedbackService}",
);
expect(appSource).toContain(
"<FeedbackHost feedbackService={baseFeedbackService} platform={platform} />",
);
expect(appSource).not.toContain(
"<FeedbackHost feedbackService={services?.feedbackService} platform={platform} />",
);
});
});
[ ] Step 2: Run the test to verify it fails for the current bug
Run: pnpm exec vitest run packages/ui/test/feedbackBaseServiceBoundary.test.ts --reporter=dot
Expected: FAIL because Root does not yet pass baseFeedbackService and App still renders FeedbackHost with services?.feedbackService.
Files:
packages/ui/src/app-shell/types.tspackages/ui/src/root/RootWorkspaceContent.tsxpackages/ui/src/Root.tsxpackages/ui/src/App.tsxpackages/ui/test/feedbackBaseServiceBoundary.test.tsInterfaces:
IFeedbackService from @zcode/services and RootProps.services.feedbackService.Produces: required AppProps.baseFeedbackService: IFeedbackService; WorkspaceShellLayoutProps excludes that application-level dependency.
[ ] Step 1: Add the typed application-level dependency
Change the service type import and props in packages/ui/src/app-shell/types.ts:
import type { IFeedbackService, IServiceAccessor } from "@zcode/services";
export interface AppProps {
services: IServiceAccessor;
baseFeedbackService: IFeedbackService;
}
export interface WorkspaceShellLayoutProps extends Omit<AppProps, "baseFeedbackService"> {
}
Insert baseFeedbackService immediately after services. Replace only the extends AppProps clause on WorkspaceShellLayoutProps; do not copy or remove its current members.
RootWorkspaceContentUpdate the type import, prop declaration, destructuring, and StableWorkspaceApp invocation in packages/ui/src/root/RootWorkspaceContent.tsx:
import type { IFeedbackService, IServiceAccessor } from "@zcode/services";
interface RootWorkspaceContentProps {
workspaceScopedServices: IServiceAccessor;
baseFeedbackService: IFeedbackService;
}
export function RootWorkspaceContent({
workspaceScopedServices,
baseFeedbackService,
}: RootWorkspaceContentProps) {
}
<StableWorkspaceApp
services={workspaceScopedServices}
baseFeedbackService={baseFeedbackService}
/>
Add the interface member after workspaceScopedServices, add the destructured parameter after the same field, and add the JSX prop immediately after services. Preserve all other current parameters and JSX props.
RootAdd the prop at the existing RootWorkspaceContent call in packages/ui/src/Root.tsx:
<RootWorkspaceContent
workspaceScopedServices={workspaceScopedServices}
baseFeedbackService={services.feedbackService}
/>
Insert the new prop immediately after workspaceScopedServices; preserve the remaining call-site props.
FeedbackHost use only the explicit base dependencyUpdate App destructuring and the feedback host in packages/ui/src/App.tsx:
export function App({
services,
baseFeedbackService,
}: AppProps) {
return (
<>
{/* Bugfix: 反馈是应用级能力,必须固定走本机 base host;SSH session 连接中或断开时,
workspace-scoped services 会切成断连代理,不能让反馈提交跟随远程 session 失效。 */}
<FeedbackHost feedbackService={baseFeedbackService} platform={platform} />
</>
);
}
Add the destructured prop after services. Replace the current one-line FeedbackHost expression with the Chinese cause comment and the new expression; preserve the surrounding command center and workspace shell JSX.
Run: pnpm exec vitest run packages/ui/test/feedbackBaseServiceBoundary.test.ts --reporter=dot
Expected: PASS with 1 test passed.
Run: pnpm exec vitest run packages/ui/test/feedbackSubmitForm.test.ts packages/ui/test/feedbackCenter.test.ts packages/ui/test/useWorkspaceServices.test.ts --reporter=dot
Expected: PASS with no failures. This verifies existing feedback submission behavior and confirms the remote disconnected proxy remains protected.
[ ] Step 7: Commit the implementation
git add packages/ui/src/app-shell/types.ts packages/ui/src/root/RootWorkspaceContent.tsx packages/ui/src/Root.tsx packages/ui/src/App.tsx packages/ui/test/feedbackBaseServiceBoundary.test.ts
git commit -m "fix(feedback): keep submissions on base service"
Files:
Interfaces:
Produces: fresh test, typecheck, lint, and diff evidence for handoff.
[ ] Step 1: Run the focused regression test again
Run: pnpm exec vitest run packages/ui/test/feedbackBaseServiceBoundary.test.ts --reporter=dot
Expected: PASS with 1 test passed.
Run: pnpm typecheck
Expected: exit code 0 with no TypeScript errors.
Run: pnpm lint
Expected: exit code 0 with no lint errors.
Run: git status --short && git log -3 --oneline && git show --stat --oneline HEAD
Expected: clean worktree; the latest implementation commit contains only the four UI source files and the regression test, while the preceding documentation commits contain the approved spec and this plan.