add header rescan button to apply officer-items changes without restart
New POST /api/rescan re-runs the boot item setup (ensureItemDirs + ensureToolLoader) and returns live item counts; the header button calls it and invalidates the item query caches so the UI refetches from disk. Also fix ensure-tool-loader to write into OFFICER_ITEMS_DIR/extensions (the runtime read path) instead of the now-unread DATA_PATH/extensions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { Sheet, SheetContent, SheetHeader, SheetTitle } from '@/components/ui/sh
|
||||
import type { DockItem } from '../Dock';
|
||||
import { useIsTouch } from '../useIsTouch';
|
||||
import { UserMenu } from './UserMenu';
|
||||
import { RescanButton } from '../Rescan/RescanButton';
|
||||
// import { BugReportButton } from '../BugReport/BugReportButton';
|
||||
|
||||
type HeaderProps = {
|
||||
@@ -52,6 +53,7 @@ export function Header({ dockItems }: HeaderProps) {
|
||||
*/}
|
||||
{/* Bug Report — hidden */}
|
||||
{/* <BugReportButton /> */}
|
||||
<RescanButton />
|
||||
<UserMenu />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user