Skip to content

Projects menu + New-project creation flow + chrome copy (slice 1: chrome/fork) #203

Closed

Description

@kateebonner

Part of #202 (slice 1 of 2 — chrome/fork). Code lives in the opencode fork (packages/app, the Solid webview); ships as its own fork PR, independently of slice 2.

Important

Problem

On the dashboard, creating a project is buried (a small folder-add that only registers an existing directory — no true "create"), the defaults capsule mislabels global choices as "Session defaults", and the Connections popover still carries a Vaults tab that the native sidebar now owns.

Approach

Make Project the organizing noun in the chrome: a first-class New-project flow (name + location → create dir, best-effort git init, register, open first session), the "Sessions" menu becomes a project-first Projects menu with sessions nested, the defaults capsule copy tells the truth, and the Connections popover sheds its Vaults tab. Reuses the existing directory-picker and edit-project dialogs.

Scope

In: Projects menu (New project on top; projects listed, current marked; recent sessions nested per project with overflow; orphan sessions grouped under their directory path) · New-project hero action in the dashboard body · creation dialog (Name→slug preview, Location w/ remembered parent, "Open existing folder instead…" secondary) · best-effort git-init on create · Connections popover drops the Vaults tab (name unchanged) · defaults capsule copy → "Defaults — model & solver, apply everywhere".
Out: sidebar/extension changes (slice 2) · renaming Connections to Devices · per-session overrides.


Acceptance Criteria

  1. A first-class New project action shows in the dashboard body's project area; it and the Projects menu's top item both open the creation dialog.
  2. Creating with a valid name + location creates the directory on disk, best-effort git-inits it, registers it, and opens a first session — no palette or external file manager.
  3. Name collision and unwritable location each produce an inline, recoverable error; nothing partial is left on disk or registered.
  4. A git-init failure or absent git does not block creation: the project is still created, registered, and opened, with a non-blocking notice that change tracking is unavailable.
  5. "Open existing folder instead…" reaches the current directory-picker flow unchanged.
  6. The former "Sessions" entry is Projects: projects listed with current marked; each shows recent sessions nested with an overflow to all; selecting a session opens it exactly as before.
  7. Sessions whose directory matches no registered project stay reachable, grouped under their directory path.
  8. The Connections popover no longer shows a Vaults tab; its name and the Pasqal card are unchanged.
  9. The defaults capsule no longer says "Session defaults"; it presents the pair as global defaults (copy-only; no stored state/keys touched).
  10. Existing registered projects, session bindings, model pin, and solver mode survive with no migration.

Key Decisions

  • Creation is directory-level; git init is best-effort (the atomic unit is {directory + registration}, git layers on top); no environment scaffolding.
  • Nesting is presentation only — sessions keep their existing directory binding; no re-keying.
  • Pure helpers get unit tests: name→slug, collision detection, orphan-session grouping, and the best-effort-git-init outcome (created-with-git / created-without-git). UI wiring follows the reuse-first suites.
Prior Art / Patterns
  • home.tsx addProjects / chooseProject / openProjectNewSession — the register + open-session path to extend.
  • dialog-edit-project.tsx, dialog-select-directory.tsx — reused dialogs.
  • amicode-defaults-capsule.tsx — the capsule (copy change only).
  • The status-popover Connections tab structure — drops the Vaults tab.

Source

Part of #202. Design + glossary in the parent; grilled via grill-with-docs 2026-07-22.

Activity

  1. kateebonner commented on Jul 23, 2026

    @kateebonner
    ContributorAuthor

    Implemented and merged via harmoniqs/opencode#46 (fork-side; the cross-repo 'Part of' link doesn't auto-close). All ACs delivered, plus the live-review evolution documented on the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions