mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 06:42:03 +00:00
♻️ refactor: implement Phase 1 folder-pattern compliance
- Rename App.tsx to app.tsx (kebab-case naming convention) - Add barrel exports (index.ts) for src/hooks/ - Add barrel exports (index.ts) for src/components/dialogs/ - Add barrel exports (index.ts) for src/components/layout/ - Update renderer.tsx import to use lowercase app.tsx This is Phase 1 of folder-pattern.md compliance: establishing proper file naming conventions and barrel export patterns. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { useState, useCallback } from "react";
|
||||
import { RouterProvider } from "@tanstack/react-router";
|
||||
import { router } from "./utils/router";
|
||||
import { SplashScreen } from "./components/splash-screen";
|
||||
import { useSettingsMigration } from "./hooks/use-settings-migration";
|
||||
import "./styles/global.css";
|
||||
import "./styles/theme-imports";
|
||||
import { useState, useCallback } from 'react';
|
||||
import { RouterProvider } from '@tanstack/react-router';
|
||||
import { router } from './utils/router';
|
||||
import { SplashScreen } from './components/splash-screen';
|
||||
import { useSettingsMigration } from './hooks/use-settings-migration';
|
||||
import './styles/global.css';
|
||||
import './styles/theme-imports';
|
||||
|
||||
export default function App() {
|
||||
const [showSplash, setShowSplash] = useState(() => {
|
||||
// Only show splash once per session
|
||||
if (sessionStorage.getItem("automaker-splash-shown")) {
|
||||
if (sessionStorage.getItem('automaker-splash-shown')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -18,11 +18,11 @@ export default function App() {
|
||||
// Run settings migration on startup (localStorage -> file storage)
|
||||
const migrationState = useSettingsMigration();
|
||||
if (migrationState.migrated) {
|
||||
console.log("[App] Settings migrated to file storage");
|
||||
console.log('[App] Settings migrated to file storage');
|
||||
}
|
||||
|
||||
const handleSplashComplete = useCallback(() => {
|
||||
sessionStorage.setItem("automaker-splash-shown", "true");
|
||||
sessionStorage.setItem('automaker-splash-shown', 'true');
|
||||
setShowSplash(false);
|
||||
}, []);
|
||||
|
||||
2
apps/ui/src/components/dialogs/index.ts
Normal file
2
apps/ui/src/components/dialogs/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export { BoardBackgroundModal } from './board-background-modal';
|
||||
export { FileBrowserDialog } from './file-browser-dialog';
|
||||
1
apps/ui/src/components/layout/index.ts
Normal file
1
apps/ui/src/components/layout/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { Sidebar } from './sidebar';
|
||||
9
apps/ui/src/hooks/index.ts
Normal file
9
apps/ui/src/hooks/index.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export { useAutoMode } from './use-auto-mode';
|
||||
export { useBoardBackgroundSettings } from './use-board-background-settings';
|
||||
export { useElectronAgent } from './use-electron-agent';
|
||||
export { useKeyboardShortcuts } from './use-keyboard-shortcuts';
|
||||
export { useMessageQueue } from './use-message-queue';
|
||||
export { useResponsiveKanban } from './use-responsive-kanban';
|
||||
export { useScrollTracking } from './use-scroll-tracking';
|
||||
export { useSettingsMigration } from './use-settings-migration';
|
||||
export { useWindowState } from './use-window-state';
|
||||
@@ -1,8 +1,8 @@
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import App from "./App";
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import App from './app';
|
||||
|
||||
createRoot(document.getElementById("app")!).render(
|
||||
createRoot(document.getElementById('app')!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>
|
||||
|
||||
Reference in New Issue
Block a user