Skip to content

An open-source, faster Devin alternative

TypeScript

web: the project list has a sidebar entry

Igor Zalutskidb38d948107d
diff --git a/web/src/components/app-shell-nav.ts b/web/src/components/app-shell-nav.ts
index b286813a..9a32685f 100644
--- a/web/src/components/app-shell-nav.ts
+++ b/web/src/components/app-shell-nav.ts
@@ -5,6 +5,7 @@ import {
Boxes,
BrainCircuit,
CalendarClock,
+ FolderKanban,
KeySquare,
Layers,
MessagesSquare,
@@ -109,6 +110,14 @@ export function managedAgentsNav(options: {
)
}
+ if (!options.projectId) {
+ // The project list is the home screen; it needs a place in the sidebar so
+ // it stays reachable once an advanced area is open.
+ groups.push({
+ items: [{ to: '/', label: 'Projects', icon: FolderKanban, end: true }],
+ })
+ }
+
if (options.durableSessionsEnabled) {
groups.push({
label: 'Durable sessions',
diff --git a/web/src/components/app-shell.test.ts b/web/src/components/app-shell.test.ts
index 2eac3f15..b9e2f505 100644
--- a/web/src/components/app-shell.test.ts
+++ b/web/src/components/app-shell.test.ts
@@ -8,8 +8,13 @@ describe('managed agents navigation', () => {
infrastructureEnabled: false,
}
- it('leaves the homepage sidebar empty when advanced areas are disabled', () => {
- expect(managedAgentsNav(defaults)).toEqual([])
+ it('lists the project list on the homepage even without advanced areas', () => {
+ expect(
+ managedAgentsNav(defaults).map((group) =>
+ group.items.map((item) => item.label),
+ ),
+ ).toEqual([['Projects']])
+ expect(managedAgentsNav(defaults)[0]?.items[0]?.end).toBe(true)
})
it('shows project navigation only after a project is selected', () => {
@@ -47,14 +52,14 @@ describe('managed agents navigation', () => {
...defaults,
durableSessionsEnabled: true,
}).map((group) => group.label),
- ).toEqual(['Durable sessions'])
+ ).toEqual([undefined, 'Durable sessions'])
expect(
managedAgentsNav({
...defaults,
infrastructureEnabled: true,
}).map((group) => group.label),
- ).toEqual(['Infrastructure'])
+ ).toEqual([undefined, 'Infrastructure'])
})
it('keeps enabled advanced areas below project navigation', () => {