Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
chore(desktop): hide publishes tab
fmfsaisaibe8e8e6f4335
diff --git a/apps/desktop/src/renderer/features/plugin/GhostPluginPage.tsx b/apps/desktop/src/renderer/features/plugin/GhostPluginPage.tsxindex 438c49945c..c3e66f35cb 100644--- a/apps/desktop/src/renderer/features/plugin/GhostPluginPage.tsx+++ b/apps/desktop/src/renderer/features/plugin/GhostPluginPage.tsx@@ -171,10 +171,10 @@ const MAX_VISIBLE_INSTALLED_PLUGINS = 8;const MAX_COLLAPSED_INSTALLED_PLUGIN_PREVIEWS = 3;/**- * 「我的发布」暂以插件页二级 tab 呈现,避免与「已安装」争抢顶层布局。- * 用户确认本期效果后会关掉此开关;下期重新开放仍沿用当前 tab 形态。+ * 本期隐藏「我的发布」二级 tab,避免与「已安装」争抢顶层布局。+ * 重新开放前必须先定首个 tab 的标签;当前「概览」仅为已被用户否掉的占位词,并非定案。*/-export const SHOW_MY_PUBLISHES_SECTION = true;+export const SHOW_MY_PUBLISHES_SECTION = false;/*** Product gate for the whole secondary tab experience. The overview stays mounted while tabsdiff --git a/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginCard.test.tsx b/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginCard.test.tsxindex a2af899664..4cfb0bed21 100644--- a/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginCard.test.tsx+++ b/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginCard.test.tsx@@ -62,10 +62,9 @@ describe('MyPublishesSectionVisibilityGate', () => {};it('shows both secondary tabs and switches their selected panel when enabled', () => {- expect(SHOW_MY_PUBLISHES_SECTION).toBe(true);render(<MyPublishesSectionVisibilityGate- visible={SHOW_MY_PUBLISHES_SECTION}+ visible{...labels}publishes={<div data-testid="publishes-content" />}>@@ -103,16 +102,25 @@ describe('MyPublishesSectionVisibilityGate', () => {}const { container } = render(- <MyPublishesSectionVisibilityGate visible={false} {...labels} publishes={<PublishesProbe />}>- <div data-testid="overview-content-disabled" />+ <MyPublishesSectionVisibilityGate+ visible={SHOW_MY_PUBLISHES_SECTION}+ {...labels}+ publishes={<PublishesProbe />}+ >+ <section className="mt-6" data-testid="installed-content-disabled" />+ <section className="mt-10" data-testid="recommended-content-disabled" /></MyPublishesSectionVisibilityGate>,);// This excludes hiding only the publishing panel while leaving a one-tab row or wrapper noise.+ expect(SHOW_MY_PUBLISHES_SECTION).toBe(false);expect(screen.queryByRole('tablist')).toBeNull();expect(screen.queryByRole('tab')).toBeNull();- expect(container.children).toHaveLength(1);- expect(container.firstElementChild).toBe(screen.getByTestId('overview-content-disabled'));+ const installed = screen.getByTestId('installed-content-disabled');+ const recommended = screen.getByTestId('recommended-content-disabled');+ expect(Array.from(container.children)).toEqual([installed, recommended]);+ expect(installed.className).toBe('mt-6');+ expect(recommended.className).toBe('mt-10');expect(publishesRender).not.toHaveBeenCalled();});