PAP-14698 · Secrets folders
Jump to a screen
PAP-14698 · Wireframes

Secrets — navigate slash-named secrets as folders

Secrets already use path-style names like /dev/github/oauth/clientsecret (the create dialog's own placeholder is /dev/foo/bar), but the list renders them as one flat unsorted table. This set adds a derived folder view — no server or data-model change: folders are computed from name prefixes on the client. You can drill into a folder, see it in the URL, and create a secret "here" with the path pre-filled.

4 screens + flow Desktop, 1 mobile variant Lo-fi · monochrome Click any wireframe to zoom
Flow

Root → folder → create-in-folder, with search as a global branch

Solid arrows are the happy path. The folder path lives in the URL (?path=dev/github/oauth) so breadcrumb, browser Back, and shared links all work. Search always escapes the current folder.

flow.svg1280×416
Flow diagram
Step 1 · Browse

1.Root — folders above loose secrets

The Secrets tab keeps its exact table (Name / Status / Version-coverage / Updated / actions). Folder rows are synthesized from the first path segment of every secret name and sort above root-level secrets. Everything else on the page — tabs, filters, detail sheet — is untouched.

01-root-folders.svg1280×800 · desktop
Root folder view (desktop) wireframe

Annotations

  • 1 — Folders / Flat segmented toggle. Flat is exactly today's list (full names); preference persists per user. Default = Folders.
  • 2 — Breadcrumb row. At root it reads "All secrets" plus an aggregate count.
  • 3 — Folder rows: folder icon, first path segment, recursive count ("12 secrets · 3 folders"), most-recent update inside, chevron. Click anywhere on the row to drill in. Secrets with no slash in their name list below folders as normal rows.
  • 4 — "New folder" is a lightweight affordance: it only stages a path prefix for the create dialog (folders are name-derived and have no server record; an empty folder materializes when its first secret is saved).
Why this changes: today the list is flat and unsorted, so a company with 30+ path-named secrets scans as noise. Folders give the existing naming convention navigational meaning without any migration.
Step 2 · Drill in

2.Inside a folder — breadcrumb, leaf names, "up" row

Inside dev/github/oauth: clickable breadcrumb segments, subfolders first, then this folder's secrets shown by leaf name (the full env key stays visible in the code line beneath). The URL is ?path=dev/github/oauth, so Back and shared links land here.

02-folder-view.svg1280×800 · desktop
Folder view (desktop) wireframe
narrow · cards375×812
Folder view (narrow card view) wireframe

Annotations

  • 1 — Breadcrumb: "All secrets / dev / github / oauth". Every segment navigates; deep paths middle-truncate into a "…" dropdown after ~4 segments.
  • 2 — "Up to github" utility row for keyboard/mouse users who prefer list navigation over the breadcrumb.
  • 3 — Create secret opens the existing dialog pre-filled with this folder's path (screen 3).
  • 4 — Empty-folder state (shown inline for reference): appears after "New folder" or when filters hide everything; primary action creates a secret here.
Why this changes: leaf names ("clientsecret") plus context from the breadcrumb read better than five rows all prefixed dev/github/oauth/; the existing detail sheet still shows the full name.
Step 3 · Create

3.Create secret with the folder path pre-filled

The existing create dialog (#9797 rework) gains a path-prefix chip in the Name field when opened from inside a folder. Type only the leaf name; the stored name is prefix + leaf and the env key derives from the full name exactly as today (slashes → dashes).

03-create-in-folder.svg1280×800 · desktop · modal
Create secret in folder dialog wireframe

Annotations

  • 1 — Prefix chip dev/github/oauth/. Removing it (✕ or backspace at position 0) dissolves the chip into plain editable text for people who want a different path. Typing / inside the leaf simply extends the path — no validation change; names keep allowing slashes as before.
  • 2 — Key preview derives from the full name (dev-github-oauth-clientsecret), exactly the existing normalize-on-type behavior. Pencil to override, as today.
Why this changes: "add a secret in this folder" is the request in PAP-14698 — the implied path should come for free instead of being retyped (and mistyped) each time.
Step 4 · Find

4.Search — global, flat, full paths

Typing in search always searches every folder (name, key, description, external ref — unchanged fields) and presents flat results with the path prefix de-emphasized and the leaf bold. Clearing search returns to the folder you were in.

04-search-results.svg1280×800 · desktop
Search results (desktop) wireframe

Annotations

  • 1 — Result header replaces the breadcrumb: "Search results · N matches across all folders". The previous folder is remembered and restored on clear.
  • 2 — Path prefix rendered muted, leaf bold. Clicking the muted path jumps to that folder; clicking the leaf opens the detail sheet as today.
  • 3 — The Folders/Flat toggle is inert while a query is active (results are always flat), shown disabled to avoid a dead control.
Why this changes: scoping search to the current folder is the classic trap — users type a name they know exists, see zero results, and conclude the secret is gone. Global-always with visible full paths avoids it.
For reviewer

Open questions

  • Default view — proposal defaults to Folders when any secret contains a slash, Flat otherwise (small teams with plain names see no change). OK?
  • New folder button — keep it (stages a transient empty folder + prefix for create), or drop it and let folders exist purely by creating a secret with a path? Dropping it is simpler; keeping it is more discoverable.
  • Case & leading slash — grouping treats /dev/x and dev/x as the same folder (leading/duplicate slashes normalized for grouping only; stored names untouched). Segment matching is case-sensitive to mirror name uniqueness. OK?
  • Move/rename to folder — a "Move to folder…" row action (bulk rename of the name prefix) is deliberately out of scope for v1; names are identity-ish (exact-match unique) and renames may deserve their own review. Flag if you want it in v1.
  • My secrets tab — v1 applies folders to the main Secrets tab only (company + each-user definitions are already unified there). The "My secrets" values tab stays flat. OK?