Skip to content

Commit fbbcfdd

Browse files
author
AvatarOS Developer
committed
Version before Gemini's Refactor
1 parent 1d93f0e commit fbbcfdd

24 files changed

+467
-319
lines changed

AGENTS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,11 @@ git push
8484
Notes
8585
- CORS allows `FRONTEND_URL`, `BACKEND_URL`, `DOMAIN`, and `https://${VERCEL_URL}` automatically.
8686
- For Vercel, build client with `vercel-build` and route API to `server.js` (see `vercel.json`). Ensure `AUTH_SECRET` and provider keys are set in Vercel project settings.
87+
88+
## App Analysis Framework
89+
90+
When analyzing an app, consider the following angles:
91+
92+
1. **Orchestrator Context Awareness:** How the app interacts with the orchestrator and how the orchestrator is aware of the app's context.
93+
2. **Components and Storybook Stories:** The React components that make up the app and their corresponding Storybook stories.
94+
3. **Database and Interconnectivity:** How the app interacts with the database and other services.

CLAUDE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,11 @@ echo "$(date +%F): Short description of the change." >> CHANGELOG.md
5555
git add CHANGELOG.md docs/IMPLEMENTATION_NOTES.md
5656
git add -A && git commit -m "chore(changelog): update for <feature/area>" && git push
5757
```
58+
59+
## App Analysis Framework
60+
61+
When analyzing an app, consider the following angles:
62+
63+
1. **Orchestrator Context Awareness:** How the app interacts with the orchestrator and how the orchestrator is aware of the app's context.
64+
2. **Components and Storybook Stories:** The React components that make up the app and their corresponding Storybook stories.
65+
3. **Database and Interconnectivity:** How the app interacts with the database and other services.

CODEX.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@ git add -A && git commit -m "chore(changelog): update for <feature/area>" && git
2222
```
2323

2424
If the change is substantial, add a brief rationale to `docs/IMPLEMENTATION_NOTES.md`.
25+
26+
## App Analysis Framework
27+
28+
When analyzing an app, consider the following angles:
29+
30+
1. **Orchestrator Context Awareness:** How the app interacts with the orchestrator and how the orchestrator is aware of the app's context.
31+
2. **Components and Storybook Stories:** The React components that make up the app and their corresponding Storybook stories.
32+
3. **Database and Interconnectivity:** How the app interacts with the database and other services.

GEMINI.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,11 @@ echo "$(date +%F): Short description of the change." >> CHANGELOG.md
5454
git add CHANGELOG.md docs/IMPLEMENTATION_NOTES.md
5555
git add -A && git commit -m "chore(changelog): update for <feature/area>" && git push
5656
```
57+
58+
## App Analysis Framework
59+
60+
When analyzing an app, consider the following angles:
61+
62+
1. **Orchestrator Context Awareness:** How the app interacts with the orchestrator and how the orchestrator is aware of the app's context.
63+
2. **Components and Storybook Stories:** The React components that make up the app and their corresponding Storybook stories.
64+
3. **Database and Interconnectivity:** How the app interacts with the database and other services.

src/components/App.jsx

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import ArchivaEntryForm from './ArchivaEntryForm.jsx'
2020
import WorkflowsList from './WorkflowsList.jsx'
2121
import WorkflowEditor from './WorkflowEditor.jsx'
2222
import ModuleViewer from './ModuleViewer.jsx'
23-
import Assistant from './Assistant.jsx'
23+
2424
import PlannerSidebar from './PlannerSidebar.jsx'
2525
import PlannerCanvas from './PlannerCanvas.jsx'
2626
import CalendarAI from './CalendarAI.jsx'
@@ -36,44 +36,18 @@ import { personalities } from '../lib/assistant/personalities'
3636
import { modulesByDiscipline } from '../lib/modules'
3737
import '../styles/components/command-palette.css'
3838

39-
const ModuleSelector = () => {
40-
const activeModuleId = useStore.use.activeModuleId()
41-
42-
return (
43-
<>
44-
{Object.entries(modulesByDiscipline).map(([discipline, modules]) => (
45-
<div className="semester-group" key={discipline}>
46-
<h2>{discipline}</h2>
47-
<div className="module-list">
48-
{modules.map(module => {
49-
const personality = personalities[module['Module Code']];
50-
return (
51-
<button
52-
key={module['Module Code']}
53-
onClick={() => selectModule(module['Module Code'])}
54-
className={c({ active: module['Module Code'] === activeModuleId })}
55-
>
56-
<div className="module-info">
57-
<span className="icon">{personality?.icon || 'school'}</span>
58-
<p>{personality?.name || module['Module Title']}</p>
59-
</div>
60-
</button>
61-
)
62-
})}
63-
</div>
64-
</div>
65-
))}
66-
</>
67-
)
68-
}
39+
import Chat from './Chat.jsx';
40+
import ChatSidebar from './ChatSidebar.jsx';
41+
import ModuleKnowledgeSection from './ModuleKnowledgeSection.jsx';
42+
import ModuleSelector from './ModuleSelector.jsx';
6943

7044
export default function App() {
7145
const isWelcomeScreenOpen = useStore.use.isWelcomeScreenOpen()
7246
const activeApp = useStore.use.activeApp()
7347
const theme = useStore.use.theme()
7448
const activeModuleId = useStore.use.activeModuleId();
75-
const isAssistantOpen = useStore.use.isAssistantOpen();
76-
const showModuleChat = useStore.use.showModuleChat();
49+
50+
const showKnowledgeSection = useStore.use.showKnowledgeSection();
7751
const activeEntryId = useStore.use.activeEntryId();
7852
const isAuthenticated = useStore.use.isAuthenticated();
7953
const isCheckingAuth = useStore.use.isCheckingAuth();
@@ -182,9 +156,10 @@ export default function App() {
182156

183157
const renderLeftColumnContent = () => {
184158
switch (activeApp) {
159+
case 'chat':
160+
return <ChatSidebar />;
185161
case 'ideaLab':
186-
return <ModuleSelector />;
187-
case 'imageBooth':
162+
return <ModuleSelector />; case 'imageBooth':
188163
return <ModeSelector />;
189164
case 'archiva':
190165
return <ArchivaSidebar />;
@@ -205,8 +180,10 @@ export default function App() {
205180

206181
const renderRightColumnContent = () => {
207182
switch (activeApp) {
183+
case 'chat':
184+
return <Chat />;
208185
case 'ideaLab':
209-
return showModuleChat ? <ModuleAgentsChat /> : null;
186+
return showKnowledgeSection ? <ModuleKnowledgeSection moduleId={activeModuleId} /> : null;
210187
case 'imageBooth':
211188
return <BoothViewer />;
212189
case 'archiva':
@@ -246,14 +223,14 @@ export default function App() {
246223
}
247224

248225
const hasModuleSelected = activeApp === 'ideaLab' && activeModuleId;
249-
const isThreeColumnLayout = hasModuleSelected && showModuleChat;
226+
const isThreeColumnLayout = (activeApp === 'ideaLab' && hasModuleSelected && showKnowledgeSection) || activeApp === 'chat';
250227

251228
return (
252229
<main data-theme={theme} className={c({
253230
'three-column': isThreeColumnLayout
254231
})}>
255232
{isWelcomeScreenOpen && <WelcomeScreen onStart={handleStart} />}
256-
{isAssistantOpen && <Assistant />}
233+
257234
{isSettingsOpen && <SettingsModal />}
258235
{isSystemInfoOpen && <SystemInfoModal isOpen={isSystemInfoOpen} onClose={() => setIsSystemInfoOpen(false)} />}
259236
<CommandPalette isOpen={isCommandPaletteOpen} onClose={() => setIsCommandPaletteOpen(false)} />
@@ -285,7 +262,7 @@ export default function App() {
285262
</div>
286263
)}
287264

288-
{hasModuleSelected && showModuleChat && (
265+
{isThreeColumnLayout && (
289266
<div
290267
className="column-resizer"
291268
onMouseDown={handleResizerMouseDown}
@@ -295,7 +272,7 @@ export default function App() {
295272
/>
296273
)}
297274

298-
{(activeApp !== 'ideaLab' || showModuleChat) && (
275+
{(activeApp !== 'ideaLab' || showKnowledgeSection) && (
299276
<div
300277
className="right-column"
301278
style={isThreeColumnLayout ? { width: `${rightColumnWidth}px` } : {}}

src/components/AppSwitcher.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { switchApp } from '../lib/actions';
88

99
const apps = [
1010
{ id: 'ideaLab', title: 'Academic Mods' },
11+
{ id: 'chat', title: 'Chat' },
1112
{ id: 'imageBooth', title: 'VizGen Booth' },
1213
{ id: 'archiva', title: 'ArchivAI' },
1314
{ id: 'workflows', title: 'Workflows' },

0 commit comments

Comments
 (0)