Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python
2.5 KB
Raw Blame

0080. Desktop projects are folders with durable local preferences

Status: accepted

Context

Folder selection was hidden in a workspace menu, and the Workspace navigation item opened files. Project preferences lived only in browser storage, so a different local server port could make saved projects appear absent.

Decision

Projects provides folder discovery, new chats and a route to saved conversations. Files and Changes have separate navigation. Conversation discovery defaults to the selected project; other saved conversations remain available through filters. Focusing a chat selects its folder for subsequent new chats.

The desktop saves project preferences in its application settings through validated main-process IPC and serialized atomic writes. Existing browser values are migrated on first use and retained as a fallback. Preferences contain folder choices, not conversation history. The web client continues using browser storage.

Startup context is shown separately from saved folder choices. Merely launching in a directory does not save it as a project or evict a deliberate choice from the saved-list limit. Opening a folder or saving its settings records a choice. Existing preferences without source metadata remain saved entries; their presence alone is not evidence of earlier session activity.

Successful session saves also register their exact canonical working folder in an atomic, private device-local lookup record. The GUI verifies readable session headers before offering a folder as Session history, ordered by saved activity. Hints neither promote parent repositories nor authorize deleting any files. History suggestions and derived activity timestamps do not enter saved choices. Existing sessions in known folders are checked without a registry record; an older terminal-only folder outside known roots becomes discoverable on its next successful save. We do not recursively scan the user's filesystem at startup.

Validation

The project-store test covers restart persistence and ordered writes. The offline desktop project suite covers folder selection, scoped conversation discovery, new chat inheritance, and separate Files/Changes navigation. Its preview fixture starts Bun and exercises the browser tool transport without a model call.

Recovery fixtures also cover failed initial loads and pagination, stale search results, cancellable conversation restoration, and invalid typed folder paths. Review errors remain distinct from clean working trees, and delayed responses cannot replace the currently selected filter or worktree.