Files
orca/src/renderer
NeilandOrca d3388603bb feat(new-workspace): inline create-branch row, scoped suggestions, name under Advanced, tab/focus polish (#1469)
* feat(new-workspace): branch-tab create row, scoped empty hints, name under Advanced, focus polish

- Branch tab autocomplete now offers "Create new branch <name>" instead of a
  separate + button + dialog (replaces the original UX from #1408 / #1400).
  Suppressed when the typed query exactly matches an existing branch.
- "Use <X> as workspace name" row is restricted to Smart mode; on dedicated
  source tabs (GitHub/Linear/Branch) it was off-topic noise.
- Per-mode empty-state hints ("search GitHub PRs and issues", "find a branch
  or create a new one", etc.) replace the generic message.
- When a source (PR/issue/Linear/branch) is selected, the auto-derived
  workspace name is exposed as a "Name" input under Advanced where it can be
  reviewed/overridden. With an explicitly typed name the smart input itself
  is the name field, so no duplicated control.
- Forward Tab from the Repo combobox now skips the Smart/GitHub/Branch/Linear
  segmented control and lands directly in the search input. Shift-Tab from
  the input still focuses the active tab trigger so the segmented control is
  reachable in reverse. Implemented via a focusCapture interceptor on
  TabsList that distinguishes outside-entry from intra-list moves and from
  the input's own shift-tab.
- Trigger checkLinearConnection() on mount so the "Connect Linear in
  Settings" hint isn't shown stalely when the composer is the first
  Linear-aware surface to render in the session; gate the disconnected
  message on linearStatusChecked.

Co-authored-by: Orca <help@stably.ai>

* fix(new-workspace): Enter commits typed text while results are stale

When the user types faster than the 200ms search debounce, rows and
commandValue still reflect the previous query, so Enter would silently
pick a stale source row (e.g. a PR from the prior letters). Treat
results as stale while loading or while debouncedQuery hasn't caught up
to the input value, and commit the typed text via onValueChange instead.

Co-authored-by: Orca <help@stably.ai>

* fix(new-workspace): suppress stale source rows in autocomplete while typing

Source rows (GitHub items / branches / Linear issues) are driven by
debouncedQuery, so they're stale until the user pauses for the 200ms
debounce. The previous attempt only short-circuited Enter in the
input's onKeyDown, but cmdk's Command component has its own Enter
handler that still fires onSelect on the highlighted (stale) row.

Filter source rows out of the rows list itself when debouncedQuery
hasn't caught up to value, leaving only the typed-text row (use-name
in Smart, create-branch in Branches). With no stale rows present,
neither cmdk nor our own handler can pick a wrong source on Enter,
and the popover gives visual feedback (collapses to the typed-text
row) while results catch up.

Co-authored-by: Orca <help@stably.ai>

* fix(new-workspace): keep stale results visible, force highlight to typed-text row

Previous attempt removed source rows while debouncedQuery hadn't caught
up to value, which caused funky disappear/reappear flicker as the user
typed (rows present briefly while fresh, gone after the next keystroke).

Keep all source rows visible at all times to preserve continuity, but
control which row is highlighted while stale:
  - Smart/Branches: force highlight onto the typed-text row (use-name /
    create-branch) so cmdk's Enter handler commits the typed text instead
    of a stale issue/PR/branch.
  - GitHub/Linear: no typed-text fallback row exists, so clear the
    highlight; the input's onKeyDown falls through to onPlainEnter rather
    than picking a stale source.

Also fixed the input's Enter handler to fall through to onPlainEnter
when no row matches the (possibly empty) commandValue, so the keypress
isn't inert in the cleared-highlight case.

Co-authored-by: Orca <help@stably.ai>

* feat(new-workspace): auto-highlight matching source for #NNN, GH URLs, Linear IDs

When the typed value is unambiguously a source reference, snap the
autocomplete highlight onto the matching source row once it appears
instead of leaving it on the typed-text fallback. Enter then picks the
intended source.

Recognized patterns:
  - GitHub shorthand: #1234
  - GitHub URL: https://github.com/<owner>/<repo>/issues/123 or /pull/123
  - Linear identifier: STA-123 (case-insensitive [A-Z][A-Z0-9_]*-\d+)

Stale-results behavior is unchanged: while debouncedQuery hasn't caught
up to value, the typed-text row stays highlighted (Smart/Branches) or
the highlight is cleared (GitHub/Linear) regardless of intent.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-05-05 16:27:20 -07:00
..
2026-03-17 01:40:24 -07:00