merge: resolve v1.22.2 conflicts with custom

Per Q4 resolution (documented on kanban t_83741c53):
- .github/workflows/*: KEEP custom deletion (fork uses Gitea Actions under .gitea/workflows)
- ChatInput.tsx: KEEP custom forge picker states + provider-aware linkedPr
- WorkStatusContextSection.tsx: combine imports (WorkStatusPill + useConfigStore)
- WorkStatusPrimaryGroup.tsx: upstream nested-git/bootstrap-gate base + custom GitLab/Gitea forge rows
- NewWorktreeDialog.tsx: combine dialogs; keep custom MR/PR branch resolution
- SettingsView.tsx: custom deps minus undefined openThirdPartyProviderSetup
- search.ts + search.test.ts: KEEP upstream (enter-to-send, large-text-paste, first-party integrations)
- tr.ts: drop 4 auto-merge duplicate gitView.empty.* keys
This commit is contained in:
2026-09-06 10:55:54 +00:00
220 changed files with 45375 additions and 3531 deletions
@@ -95,11 +95,11 @@ which requests only providers enabled for this panel.
| Block | Source | Notes |
|---|---|---|
| Context + cost | `contextUsage.ts` over `useSessionMessages`; cost via `useSubagentCostRollup` (own cost + every descendant subagent, recursively) | see below — the store getters cannot serve this |
| Context + cost | `contextUsage.ts` over `useSessionMessages`, `Session.cost` | see below — the store getters cannot serve this |
| Branch, ahead/behind, attention | `useGitStore` directory state | warmed via `runBackgroundNetworkTask(ensureStatus)` and refreshed from Git mutation hints |
| Changed files | `useGitStore` status `files` + `diffStats` | working tree, not session-authored edits |
| PR + checks | `useFreshestPrVisualSummaryForBranch` | **read-only**; follows the freshest remote-keyed entry for the branch |
| Subagents | child sessions from `useAllLiveSessions` (`parentID`) + `useAllSessionStatuses`; per-row cost from `useSubagentCostRollup`'s `perChildCost` (each child's own subtree total, so nested subagent-of-subagent cost rolls up under its immediate parent row) | |
| Subagents | child sessions from `useAllLiveSessions` (`parentID`) + `useAllSessionStatuses` | |
| Subagent blockers | directory `permission` / `question` maps | one subscription covers every child |
| Usage | `components/usage/usageGroups.ts` over `useQuotaStore` | grouping shared with the mobile popover; presentation is not |
| Linked threads | `lib/linkedIssues.ts` over session metadata | written by the flows that attach an issue or PR |
@@ -289,6 +289,10 @@ Rows that name something the app can already show are buttons:
| MCP status | the state doubles as the button that reconnects |
| Pinned (pin icon) | unpins the message |
| Pinned (text) | jumps the transcript to that message |
| Linked (title) | opens the issue/PR in the browser |
| Linked (refresh) | refetches that entity's live state (cache-busting) |
| Linked (unlink) | removes the link from the session, after confirm |
| Link (section header) | opens the paste-a-URL link dialog |
The goal icon reproduces the **composer target button's** colour mapping, not
the goal strip's. The two disagree today — the strip paints `paused` muted and
@@ -316,20 +320,31 @@ something other than "tools available".
### Linked issues and pull requests
Written by the flows that already attach a thread — the composer's issue/PR
pickers, and session creation from an issue or PR in `NewWorktreeDialog` and
`GitHubIssuePickerDialog`. There is no manual "link this" control: attaching a
thread to the work *is* the act of linking it.
Written by the flows that attach a thread — the composer's issue/PR pickers,
session creation from an issue or PR in `NewWorktreeDialog` and
`GitHubIssuePickerDialog` — **and** by the section's own Link control, which
accepts a pasted issue/PR URL (validated against the forge before recording)
and per-row Unlink. Attaching a thread and pasting a URL are the same act of
linking; the row always knows how to unlink itself.
Stored in session metadata as a **snapshot** (`lib/linkedIssues.ts`, namespace
`openchamber.linked_issues`), riding the same `patchSessionMetadata` channel as
pinned messages. Number, title, url, author and avatar only — the body,
comments and state belong to GitHub, and mirroring them would mean owning their
staleness. The stored title can drift; that is the price of a store that never
needs refreshing. A GitHub row opens github.com. A Linear row opens the
right-hand Linear panel when Linear is connected on desktop/web; otherwise it
opens the Linear URL (no rail in VS Code or the phone shell, and none while
disconnected).
comments and state belong to the forge, and mirroring them would mean owning
their staleness.
Each row renders as a **live card** (`lib/linkedEntityLive.ts`) when the entry
resolves to a forge entity and the runtime carries that provider's API: the
current open/merged/closed state, the draft marker and the freshest title are
fetched on mount and on the row's refresh button — never on an interval. The
snapshot stays the fallback for whatever the fetch has not answered yet
(initial loading shows a spinner; a failed fetch shows a muted "live
unavailable" marker rather than silently looking stale). Fetches go through the
forge facade (`lib/forge/adapters.ts`) addressed to the session's directory, so
the repo resolves from the session's remotes; a cross-repo entity reports live
state as unavailable instead of guessing. Results are cached per entity for
60s in a module-level TTL cache, read synchronously for the initial render so
an already-resolved entity never flashes back to the snapshot.
Writes happen **after** the send promise resolves and are deliberately
swallowed on failure: the message went out, and a missing bookkeeping entry