idea-manager 0.9.5 → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,14 +1,18 @@
1
1
  {
2
2
  "name": "idea-manager",
3
- "version": "0.9.5",
4
- "description": "AI 기반 브레인스토밍 구조화 프롬프트 생성 도구. MCP Server 내장.",
3
+ "version": "0.9.7",
4
+ "description": "Turn free-form brainstorming into structured task trees with AI-generated prompts. Built-in MCP Server for autonomous AI agent execution. Local-first with SQLite, cross-PC sync via Git.",
5
5
  "keywords": [
6
6
  "brainstorm",
7
7
  "ai",
8
8
  "mcp",
9
9
  "idea",
10
+ "task-manager",
11
+ "prompt",
10
12
  "structuring",
11
- "prompt"
13
+ "project-management",
14
+ "sqlite",
15
+ "local-first"
12
16
  ],
13
17
  "author": "navskh",
14
18
  "license": "MIT",
@@ -92,16 +92,11 @@ function tabReducer(state: ITabState, action: TabAction): ITabState {
92
92
 
93
93
  const STORAGE_KEY = 'im-tabs';
94
94
 
95
+ const DEFAULT_STATE: ITabState = { tabs: [DASHBOARD_TAB], activeTabId: 'dashboard' };
96
+
95
97
  function loadState(): ITabState {
96
- if (typeof window === 'undefined') return { tabs: [DASHBOARD_TAB], activeTabId: 'dashboard' };
97
- try {
98
- const raw = localStorage.getItem(STORAGE_KEY);
99
- if (raw) {
100
- const parsed = JSON.parse(raw) as ITabState;
101
- return { tabs: ensureDashboard(parsed.tabs), activeTabId: parsed.activeTabId };
102
- }
103
- } catch { /* ignore */ }
104
- return { tabs: [DASHBOARD_TAB], activeTabId: 'dashboard' };
98
+ // Always return default on initial render to match server HTML
99
+ return DEFAULT_STATE;
105
100
  }
106
101
 
107
102
  interface TabContextValue {
@@ -126,6 +121,17 @@ export function useTabContext() {
126
121
  export function TabProvider({ children }: { children: ReactNode }) {
127
122
  const [state, dispatch] = useReducer(tabReducer, undefined, loadState);
128
123
 
124
+ // Hydrate from localStorage after mount (avoids SSR mismatch)
125
+ useEffect(() => {
126
+ try {
127
+ const raw = localStorage.getItem(STORAGE_KEY);
128
+ if (raw) {
129
+ const parsed = JSON.parse(raw) as ITabState;
130
+ dispatch({ type: 'HYDRATE', state: { tabs: ensureDashboard(parsed.tabs), activeTabId: parsed.activeTabId } });
131
+ }
132
+ } catch { /* ignore */ }
133
+ }, []);
134
+
129
135
  // Persist to localStorage
130
136
  useEffect(() => {
131
137
  localStorage.setItem(STORAGE_KEY, JSON.stringify(state));