Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): use full row for plugin install location (#597)
Kmnycc65ff4459a7
diff --git a/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx b/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsxindex 03a3f9ebb9..e3bf022c27 100644--- a/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx+++ b/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx@@ -629,6 +629,7 @@ export function DetailsSection({value: string;monospace?: boolean;action?: ReactNode;+ fullWidth?: boolean;}> = [{key: 'version',@@ -682,6 +683,7 @@ export function DetailsSection({key: 'location',label: t('settings.ghosts.detail.infoLocation'),value: detail.installDir,+ fullWidth: true,action: (<div className="flex shrink-0 items-center gap-0.5"><button@@ -727,7 +729,7 @@ export function DetailsSection({<DetailSectionHeader id="ghost-details-title" title={t('settings.ghosts.detail.infoTitle')} /><div className={cn(DETAIL_SECTION_CONTENT_CLASS, 'grid grid-cols-3 gap-x-10 gap-y-7')}>{facts.map((fact) => (- <div key={fact.key} className="min-w-0">+ <div key={fact.key} className={cn('min-w-0', fact.fullWidth && 'col-span-full')}><p className="truncate text-13 leading-5 text-[var(--text-secondary)]">{fact.label}</p><ExpandableDetailValuelabel={fact.label}diff --git a/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginDetailSections.test.tsx b/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginDetailSections.test.tsxindex 52146571b9..36e257bd13 100644--- a/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginDetailSections.test.tsx+++ b/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginDetailSections.test.tsx@@ -386,7 +386,7 @@ describe('Ghost plugin detail sections', () => {);});- it('renders every detail fact in a three-column flat grid and copies the install location', async () => {+ it('lets the install location use the full details row and preserves its actions', async () => {vi.spyOn(HTMLElement.prototype, 'clientWidth', 'get').mockReturnValue(100);vi.spyOn(HTMLElement.prototype, 'scrollWidth', 'get').mockReturnValue(300);const writeText = vi.fn().mockResolvedValue(undefined);@@ -409,6 +409,7 @@ describe('Ghost plugin detail sections', () => {expect(screen.getByText('Panel')).toBeTruthy();expect(screen.getByText('Install Location')).toBeTruthy();const installLocation = screen.getByText('/tmp/cindy-brain/builtin.example');+ expect(installLocation.closest('.col-span-full')).toBeTruthy();expect(installLocation.className).toContain('truncate');expect(installLocation.className).toContain('whitespace-nowrap');expect(screen.queryByRole('button', { name: 'See All' })).toBeNull();