feat(ui): added grouping chat sessions into ui#5267
Conversation
- Shows a '+' button on project folder headers to create a new chat directly inside that project folder - Button appears on hover, styled in project accent color - Reuses existing ody-pending-folder sessionStorage flow for folder assignment on session creation
|
Sharing a complementary piece from a self-hosted install, in case it is useful for this work. We run a locally patched folder model where the backend enforces the folder boundary, not just the sidebar:
Five files: The motivation was a user requirement phrased as: chats in a folder see chats in that folder — folders as actual rooms rather than a visual grouping. Without backend scoping, agent tools still reach every session regardless of what the sidebar shows, so the separation holds visually but not functionally. Happy to open this as a PR against this branch if the direction is welcome — or to leave it here as a note if folder semantics are meant to stay presentation-only. |

Summary
Added a database-backed project system that lets users organize chat sessions into named project groups. Introduces a new
ProjectSQLAlchemy model with owner-scoped isolation, kebab-case slug generation, and idempotent migration logic. A newroutes/project_routes.pymodule exposes full REST API endpoints: list, create, update, delete, session assignment/removal, and project detail lookups that return associated sessions. The project router is registered inapp.pyand the migration runs on startup.Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release. If your PR is onmainby accident, click "Edit" on this PR and change the base.Linked Issue
Fixes #5265
Type of Change
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
docker compose uporuvicorn app:app:app).GET /api/projects/— should return an empty[]on a fresh database.POST /api/projects/with body{"name": "My App", "description": "Testing"}— should return a project object with an id, name, and a kebab-caseslug("my-app").GET /api/projects/— should now include the newly created project.PATCH /api/projects/<id>with{"name": "Renamed App"}— verify the project name updated.POST /api/projects/<id>/assignwith{"session_id": "<some-session-id>"}— verify the session is now linked to the project.GET /api/projects/<id>— verifysession_countincreased and the session appears in the sessions list.POST /api/projects/<id>/assignwith{"session_id": "<some-session-id>", "project_id": null}— verify the session is removed from the project.DELETE /api/projects/<id>— verify the project is deleted.GET /api/projects/— verify the deleted project no longer appears.WebUI
Click arrow and add to new folder
Visual / UI changes — REQUIRED if you touched anything that renders
Anything that changes what the UI looks like — buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any
static/js/module that draws to the DOM — needs all of the following. PRs that change rendering without these WILL be closed.--red,--fg,--bg,--card,--border, etc.) — do not introduce new color values, font sizes, or spacing units.static/index.html) or plain text.Fira Code) for primary UI text. Don't override.Screenshots / clips