Skip to content

Commit c0f86d6

Browse files
committed
fix(release): stabilize beta2 validation gates
Summary: - Align package and CLI runtime versions with 0.5.9-beta.2. - Stabilize release-gate checks across CLI, desktop, web, and Cloudflare worker suites. - Add explicit TypeScript dev dependencies for shared packages used by package-level typechecks. Related docs: - spec/releases/0.5.9-beta.2.md - spec/issues/active/local-github-status.md Main changes: - Update the CLI --version source and CLI tests to 0.5.9-beta.2. - Refresh MCP CLI expectations for the current empty built-in MCP market. - Stabilize desktop deployment and plugin detail tests for current UI/store state. - Extend web sync/import-export tests to include plugin and MCP summary counts. - Normalize Cloudflare folder parentId null updates to root-compatible undefined. Verification: - pnpm verify:release:quick - pnpm --filter @prompthub/cli exec tsx src/index.ts --version - pnpm --filter @prompthub/cli test - pnpm --filter @prompthub/web-cloudflare typecheck - pnpm --filter @prompthub/web-cloudflare test - git diff --check
1 parent e381d70 commit c0f86d6

18 files changed

Lines changed: 116 additions & 32 deletions

File tree

apps/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@prompthub/cli",
3-
"version": "0.5.9-beta.1",
3+
"version": "0.5.9-beta.2",
44
"description": "PromptHub CLI - standalone command line product",
55
"license": "AGPL-3.0",
66
"type": "module",

apps/cli/tests/run.test.ts

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ describe("standalone cli wiring", () => {
115115
const result = await execCli(["--version"]);
116116

117117
expect(result.exitCode).toBe(0);
118-
expect(result.joinedStdout.trim()).toBe("0.5.8-beta.3");
118+
expect(result.joinedStdout.trim()).toBe("0.5.9-beta.2");
119119
expect(result.stderr).toEqual([]);
120120
});
121121

@@ -229,25 +229,36 @@ describe("standalone cli wiring", () => {
229229
expect(copyRes.json.content).toBe("Release Beta");
230230
});
231231

232-
it("installs MCP market templates by query", async () => {
232+
it("reports empty MCP market templates without installing placeholders", async () => {
233233
const root = makeTempRoot(tempDirs);
234234

235+
const marketRes = await execCli([...withDataDir(root), "mcp", "market"]);
236+
expect(marketRes.exitCode).toBe(0);
237+
expect(marketRes.json).toEqual([]);
238+
239+
const sourcesRes = await execCli([...withDataDir(root), "mcp", "sources"]);
240+
expect(sourcesRes.exitCode).toBe(0);
241+
expect(
242+
sourcesRes.json.some(
243+
(source: { id: string }) => source.id === "prompthub-official",
244+
),
245+
).toBe(true);
246+
expect(
247+
sourcesRes.json.some(
248+
(source: { id: string }) => source.id === "modelcontextprotocol",
249+
),
250+
).toBe(true);
251+
235252
const installRes = await execCli([
236253
...withDataDir(root),
237254
"mcp",
238255
"install",
239256
"up-to-date",
240257
]);
241-
expect(installRes.exitCode).toBe(0);
242-
expect(installRes.json.name).toBe("context7");
243-
244-
const listRes = await execCli([...withDataDir(root), "mcp", "list"]);
245-
expect(listRes.exitCode).toBe(0);
246-
expect(
247-
listRes.json.some(
248-
(server: { name: string }) => server.name === "context7",
249-
),
250-
).toBe(true);
258+
expect(installRes.exitCode).toBe(3);
259+
expect(installRes.errorJson.error).toMatchObject({
260+
code: "NOT_FOUND",
261+
});
251262
});
252263

253264
it("supports MCP market, import, env import, and health check in the shared library", async () => {
@@ -275,9 +286,7 @@ describe("standalone cli wiring", () => {
275286

276287
const marketRes = await execCli([...withDataDir(root), "mcp", "market"]);
277288
expect(marketRes.exitCode).toBe(0);
278-
expect(
279-
marketRes.json.some((item: { id: string }) => item.id === "context7"),
280-
).toBe(true);
289+
expect(marketRes.json).toEqual([]);
281290

282291
const importRes = await execCli([
283292
...withDataDir(root),
@@ -2682,7 +2691,7 @@ describe("standalone cli wiring", () => {
26822691
]);
26832692
expect(readImportedRes.exitCode).toBe(0);
26842693
expect(readImportedRes.json.content).toBe("# Project A Rule");
2685-
});
2694+
}, 10_000);
26862695

26872696
it("requires content for rules save", async () => {
26882697
const root = makeTempRoot(tempDirs);

apps/desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@prompthub/desktop",
3-
"version": "0.5.9-beta.1",
3+
"version": "0.5.9-beta.2",
44
"private": true,
55
"description": "PromptHub Desktop - Electron application for AI prompt management",
66
"main": "out/main/index.js",

apps/desktop/src/renderer/components/plugin/PluginFullDetailPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1930,7 +1930,6 @@ export function PluginFullDetailPage({
19301930

19311931
useEffect(() => {
19321932
void checkSourceUpdate(false);
1933-
// eslint-disable-next-line react-hooks/exhaustive-deps
19341933
}, [plugin.id]);
19351934

19361935
useEffect(() => {

apps/desktop/src/renderer/components/skill/SkillManager.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export function SkillManager() {
279279
const loadDeployedStatus = useSkillStore((state) => state.loadDeployedStatus);
280280
const skillFilterTags = useSkillStore((state) => state.filterTags);
281281
const pendingPluginChildDeploySkillIds = useSkillStore(
282-
(state) => state.pendingPluginChildDeploySkillIds,
282+
(state) => state.pendingPluginChildDeploySkillIds ?? [],
283283
);
284284
const consumePluginChildSkillDeployRequest = useSkillStore(
285285
(state) => state.consumePluginChildSkillDeployRequest,

apps/desktop/tests/unit/components/skill-batch-deploy-dialog.test.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ describe("SkillBatchDeployDialog install mode", () => {
204204
const copyButton = screen.getByRole("button", { name: /Copy/ });
205205
const symlinkButton = screen.getByRole("button", { name: /Symlink/ });
206206
const platformButton = screen.getByRole("button", { name: /Claude Code/ });
207+
const selectAllButton = screen.queryByRole("button", {
208+
name: "Select All",
209+
});
210+
if (selectAllButton) {
211+
fireEvent.click(selectAllButton);
212+
}
207213
const toggleAllButton = screen.getByRole("button", {
208214
name: "Deselect All",
209215
});

apps/web-cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@prompthub/web-cloudflare",
3-
"version": "0.5.9-beta.1",
3+
"version": "0.5.9-beta.2",
44
"description": "Cloudflare Workers self-hosted sync backend for PromptHub",
55
"license": "AGPL-3.0",
66
"private": true,

apps/web-cloudflare/src/web-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ export async function updateFolder(c: AppContext): Promise<Response> {
833833
if (nextVisibility !== resourceVisibility(current) && user.role !== "admin") {
834834
return failure(c, 403, ErrorCode.FORBIDDEN, "Only admin can change shared visibility");
835835
}
836-
const parentId = patch.parentId === undefined ? current.parentId : patch.parentId;
836+
const parentId = (patch.parentId === undefined ? current.parentId : patch.parentId) ?? undefined;
837837
const parentError = assertParentFolderAllowed(c, snapshot.folders.filter((item) => item.id !== folderId), parentId, nextVisibility);
838838
if (parentError) return parentError;
839839
if (parentId && collectFolderDescendants(snapshot.folders, folderId).has(parentId)) {

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@prompthub/web",
3-
"version": "0.5.9-beta.1",
3+
"version": "0.5.9-beta.2",
44
"description": "PromptHub Web – self-hosted browser-based prompt management app",
55
"license": "AGPL-3.0",
66
"private": true,

apps/web/src/client/pages/DesktopWorkspace.test.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,32 @@ vi.mock('../api/auth-session', () => ({
3434

3535
import { DesktopWorkspacePage } from './DesktopWorkspace';
3636

37+
function createMemoryStorage(): Storage {
38+
const values = new Map<string, string>();
39+
40+
return {
41+
get length() {
42+
return values.size;
43+
},
44+
clear: () => values.clear(),
45+
getItem: (key: string) => values.get(key) ?? null,
46+
key: (index: number) => Array.from(values.keys())[index] ?? null,
47+
removeItem: (key: string) => values.delete(key),
48+
setItem: (key: string, value: string) => values.set(key, value),
49+
};
50+
}
51+
3752
describe('DesktopWorkspacePage', () => {
3853
beforeEach(() => {
3954
Reflect.deleteProperty(window, '__PROMPTHUB_WEB__');
4055
Reflect.deleteProperty(window, '__PROMPTHUB_WEB_CONTEXT__');
4156
Reflect.deleteProperty(window, '__PROMPTHUB_WEB_LOGOUT__');
4257
Reflect.deleteProperty(window, 'api');
4358
Reflect.deleteProperty(window, 'electron');
59+
Object.defineProperty(window, 'localStorage', {
60+
configurable: true,
61+
value: createMemoryStorage(),
62+
});
4463
window.localStorage.clear();
4564
fetchWithAuthRetryMock.mockReset();
4665
fetchWithAuthRetryMock.mockResolvedValue(new Response('{}', { status: 200 }));

0 commit comments

Comments
 (0)