Add the no-project conversation view backed by scratch sessions #123

Merged
weichen merged 2 commits from feature/scratch-session-general-agent into main 2026-10-22 04:04:52 +00:00
Owner

Why: Accounts without project.create need isolated general-agent chats ("无项目对话"). Backend support: weichen/Agent-System-Backend#241 (POST /api/scratch-sessions, scratch: true on conversations).

What:

  • Sidebar: a "无项目对话" entry in the project menu groups all scratch sessions; scratch rows hide private/cross-read toggles and 项目设置; empty state explains sessions are independent and use no project documents/knowledge.
  • store: scratchMode view (remembered via ui.lastScratch); createTask uses the scratch API in scratch mode or when no real project exists and never auto-creates a project; restoring a saved scratch conversation re-enters the view.
  • "新建项目…" remains gated by project.create.
  • Tests: new test/scratch-session.test.ts; DefaultProjectDisabled cases updated for the scratch fallback.

Evidence: npx vitest run (64 files, 677 tests) and npx tsc -b --noEmit pass locally (SELF); CI on this HEAD is authoritative.
Refs: Agent-System-Dev docs/superpowers/specs/2026-10-22-scratch-session-general-agent-design.md

Why: Accounts without project.create need isolated general-agent chats ("无项目对话"). Backend support: weichen/Agent-System-Backend#241 (POST /api/scratch-sessions, `scratch: true` on conversations). What: - Sidebar: a "无项目对话" entry in the project menu groups all scratch sessions; scratch rows hide private/cross-read toggles and 项目设置; empty state explains sessions are independent and use no project documents/knowledge. - store: `scratchMode` view (remembered via `ui.lastScratch`); createTask uses the scratch API in scratch mode or when no real project exists and never auto-creates a project; restoring a saved scratch conversation re-enters the view. - "新建项目…" remains gated by project.create. - Tests: new test/scratch-session.test.ts; DefaultProjectDisabled cases updated for the scratch fallback. Evidence: npx vitest run (64 files, 677 tests) and npx tsc -b --noEmit pass locally (SELF); CI on this HEAD is authoritative. Refs: Agent-System-Dev docs/superpowers/specs/2026-10-22-scratch-session-general-agent-design.md
weichen added 1 commit 2026-10-22 03:18:14 +00:00
Add the no-project conversation view backed by scratch sessions
governance / governance (pull_request) Successful in 18s
ci / test-and-build (pull_request) Successful in 3m48s
1d7f2a3e1b
Why: Accounts without project.create need isolated general-agent chats.
The sidebar groups every scratch session under one "无项目对话" entry
instead of the project switcher, and the client no longer auto-creates
a default project.

Evidence: npx vitest run (64 files, 677 tests) and npx tsc -b --noEmit
pass locally (SELF); CI on the PR head is authoritative.

Impact: createTask uses POST /api/scratch-sessions in scratch mode or
when no real project exists; scratch rows hide cross-read toggles and
project settings; "新建项目…" stays gated by project.create.

Refs: Agent-System-Dev docs/superpowers/specs/2026-10-22-scratch-session-general-agent-design.md;
agent-exec receipt u3-run5 (cursor, success)

Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-22 03:48:03 +00:00
Hide project-only surfaces in scratch conversations
governance / governance (pull_request) Successful in 14s
ci / test-and-build (pull_request) Successful in 39s
b02ff83dfc
Why: Independent review found the cross-read toggle, the project inbox
scope and the archive-to-project action still reachable from an open
scratch (no-project) conversation.

Evidence: npx vitest run (685 tests) and npx tsc -b --noEmit pass locally
against the UI fix branch (SELF); CI on the PR head is authoritative.

Impact: Scratch conversations hide the cross-read setting, always show
the conversation inbox and omit onArchive; real projects are unchanged.

Refs: Agent-System-UI#60; agent-exec receipt u3e-run (cursor, success)
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit ec1ced3050 into main 2026-10-22 04:04:52 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Frontend#123