Skip to content

feat(agent): add /btw command for quick side questions - #76461

Merged
trunk-io[bot] merged 20 commits into
masterfrom
posthog-code/btw-side-question
Aug 21, 2026
Merged

trunk-io[bot] merged 20 commits into
masterfrom
posthog-code/btw-side-question

Conversation

@charlesvien

@charlesvien charlesvien commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

The backend half (the side_question task-run command) landed in #80023, so this now targets master directly. This layer is desktop-only, per the desktop backend coupling check.

Ports PostHog/code#3733 into the monorepo (PostHog/code main is frozen after the desktop import; open PRs there are remade here). Commits preserve the original authorship.

Problem

Users mid-conversation with Code often want a quick answer about something in the current session (what changed, what a function does) without derailing the active turn or polluting the conversation history. There was no way to do this without either interrupting the running agent or starting a whole new session.

Changes

Adds a /btw command that answers a one-shot side question by forking the live session's transcript, similar to how Claude Code's own /btw works. It works on both local and cloud sessions.

The fork is a single turn with no tools: tools: [], allowedTools: [], mcpServers: {}, and an always-deny canUseTool independently block tool use, and it gets its own session id and abort controller so nothing on the live session is touched. The answer renders as a dismissible card above the composer and never enters the session transcript, so it works both mid-turn and while idle.

For local sessions, the Claude adapter advertises the capability during initialize(), the same way it advertises steering. Workspace-server, the host-router, and SessionService thread the capability through, and the UI gates the command on sessionSupportsSideQuestion.

On cloud sessions, the sandbox runs the same @posthog/agent build, so the fork already works there. The side_question command reaches it over the command channel that #80023 adds, and the answer returns as the command's result rather than on the event stream, which keeps it out of the transcript. Cloud runs never negotiate the ACP capability with the desktop client, so the gate falls back to adapter === "claude". A sandbox predating the command rejects it, and the error surfaces on the card.

A second /btw on the same run is refused while one is pending, and the card says so. Dismissing the card or starting a new run lets a new question through, and the adapter aborts the fork it supersedes. Answers and cards are keyed by taskRunId, so an answer never displays under a session that reconnected or started a new run. A pending side question keeps the idle timer from reaping the session, and the answer region is aria-live so screen readers announce it.

Here's a screenshot of it in action:

Screenshot 2026-07-22 at 4 06 18 PM

How did you test this code?

Ran the full test suites for the touched packages (@posthog/agent, @posthog/core, @posthog/workspace-server, @posthog/ui) and pnpm typecheck on each; everything passes. The cloud path was exercised by running a cloud task end to end, which surfaced the unregistered side_question command schema that the last commit fixes. I haven't manually exercised /btw on a local session in the running Electron app.

After the port: from products/desktop/, pnpm install --frozen-lockfile, pnpm typecheck (24/24 clean), full @posthog/agent (1792) and @posthog/core (2961) suites, @posthog/workspace-server src/services/agent tests (103) and the @posthog/ui sessions suite (608) all pass. The workspace-server src/db tests were skipped locally (unbuilt better-sqlite3 bindings in the dev checkout, unrelated to this change); desktop CI runs the full suite.

@charlesvien charlesvien added the feature/desktop Feature Tag: Desktop label Aug 3, 2026
@trunk-io

trunk-io Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

😎 Stack merged successfully - details.

@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
### Issue 1
products/desktop/packages/ui/src/features/sessions/sideQuestionStore.ts:68-72
**Concurrent request replaces active state**

If a user submits a second `/btw` while the first is pending, `ask` replaces the first entry before the adapter rejects the concurrent request. The card then shows the second request's “already in progress” error, while the first request's successful answer is discarded by the stale-answer guard.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix: scope side-question cards to their ..." | Re-trigger Greptile

@trunk-io

trunk-io Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

@charlesvien

Copy link
Copy Markdown
Member Author

@haacked this is your PostHog/code#3733 remade in the monorepo (main there is frozen after the desktop import). Your commits are intact, only paths moved plus small conflict fixes noted in the description. Can you review and approve if it looks good?

@charlesvien

Copy link
Copy Markdown
Member Author

Closing for now: this has to work with cloud first.

@charlesvien charlesvien closed this Aug 3, 2026
@haacked

haacked commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

I'll make it work with cloude.

@haacked haacked reopened this Aug 3, 2026
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
### Issue 1
products/desktop/packages/ui/src/features/sessions/sideQuestionStore.ts:82-86
**Dismissal loses in-flight state**

When a user dismisses a pending side-question card and submits another `/btw`, `dismiss` deletes the only UI-side record of the active request without cancelling it. The new request then reaches Claude's one-at-a-time guard and fails with “A side question is already in progress,” leaving the user unable to ask again until the invisible first request finishes.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (2): Last reviewed commit: "fix: scope side-question cards to their ..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦔 Hogbox preview · ✅ ready

▶ Open the preview

🔑 Login test@posthog.com / 12345678 (demo data)
🧩 Running this PR's backend and frontend, on the PostHog :master base
🔗 Link stable across rebuilds — a re-push swaps the box underneath, the URL stays
🔒 Access tailnet only (PostHog VPN)
🛠️ Admin inspect & debug state in hogland
💤 Idle sleeps after ~30 min idle (snapshot to S3, zero node cost) and wakes on your next visit in ~30s, behind a brief "waking up" screen

commit 2c65ee6 · box box-8e6b065ab4db · ready in 637s (push → usable) · build log · rebuilds on every push, torn down on close

@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

✅ Trunk lane — non-backend lane

This PR is assigned to the non-backend lane. It does not run backend Python tests and may merge in parallel with PRs in other lanes.

✅ Bundle size — no change

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 65.81 MiB · no change

No file changed by more than 1000 B.

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

✅ Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.26 MiB · 22 files no change ███░░░░░░░ 27.9% of 4.51 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
8.27 MiB · 3,104 files no change █████████░ 85.2% of 9.71 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
789 B src/scenes/ChunkLoadErrorBoundary.tsx
762 B src/index.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
285.5 KiB ../node_modules/.pnpm/posthog-js@1.410.1/node_modules/posthog-js/dist/rrweb.js
267.7 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
238.4 KiB src/taxonomy/core-filter-definitions-by-group.json
231.5 KiB ../node_modules/.pnpm/posthog-js@1.410.1/node_modules/posthog-js/dist/module.js
154.3 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
104.5 KiB src/lib/api.ts
95.2 KiB ../packages/quill/packages/quill/dist/index.js
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

✅ Toolbar bundle — eager 2.20 MiB within budget

What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.

Metric Size Δ vs base Budget
Eager (shipped)
entry + static imports
2.20 MiB · 17 files no change ████░░░░░░ 38.4% of 5.72 MiB
Deferred (lazy) 2.08 MiB · 33 files no change n/a — loads on demand
Loader dist/toolbar.js 1.1 KiB no change █░░░░░░░░░ 5.8% of 19.5 KiB
Largest eagerly-shipped chunks
Size File
724.0 KiB dist/toolbar/toolbar-app-AGPXPBM6.css
552.2 KiB dist/toolbar/chunk-chunk-NG2USC2E.js
484.6 KiB dist/toolbar/chunk-chunk-HNXQZODW.js
133.6 KiB dist/toolbar/chunk-chunk-WCMPKPJC.js
131.8 KiB dist/toolbar/chunk-chunk-T5KY5WYR.js
71.0 KiB dist/toolbar/toolbar-app-2IWOFSQG.js
69.0 KiB dist/toolbar/chunk-chunk-27JL52RE.js
35.6 KiB dist/toolbar/chunk-chunk-6UNPKQ3S.js
20.9 KiB dist/toolbar/chunk-chunk-KX2YW6HG.js
12.2 KiB dist/toolbar/chunk-chunk-PIK3PADE.js

Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile

✅ Dist folder size — 🔺 +393 B (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1396.54 MiB · 🔺 +393 B (+0.0%)

✅ Backend coverage — no measured backend lines changed

🧪 Backend test coverage

No measured backend lines changed in this PR (patch coverage n/a).

Report-only. Patch coverage = changed backend lines covered vs origin/master. Sorted lowest first.
Known gaps: lines covered only by Temporal tests show as uncovered; core line numbers may drift if master changed the same file.

@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

React Doctor found 1 issue in 1 file · 1 warning.

1 warning

packages/ui/src/features/sessions/components/SessionView.tsx

Reviewed by React Doctor for commit ff939e5.

Comment thread products/desktop/packages/agent/src/adapters/claude/claude-agent.ts
@veria-ai

veria-ai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

@haacked
haacked force-pushed the posthog-code/btw-side-question branch from b7aa04c to e726f86 Compare August 6, 2026 23:02
@haacked
haacked force-pushed the posthog-code/btw-side-question branch from 2c65ee6 to 729a7f6 Compare August 8, 2026 01:13
@haacked
haacked changed the base branch from master to posthog-code/btw-side-question-backend August 8, 2026 01:13
The /btw fork owns a separate AbortController that the base close path
never sees, so closing a session mid-answer left the fork streaming (and
consuming tokens) until its 120s timeout fired. closeSession now aborts
sideQuestionAbort before delegating to the base close path, matching the
supersede path that already aborts the fork.

Adds a regression test that starts a gated side question, closes the
session, and asserts the fork's controller was aborted.

Generated-By: PostHog Desktop
Task-Id: 13761e40-4243-459f-86d3-cbadf3174f28
A structured task run stores a json_schema outputFormat on the live
session's query options. The /btw fork spread `...rest` over those
options and reset every other inherited key (tools, mcpServers, plugins,
etc.) but not outputFormat, so on a structured session the side question
answer was forced into the task's unrelated schema and rendered as
schema-shaped JSON or dropped as no answer.

Strip outputFormat in the destructure alongside sessionId and hooks so
the fork always answers as plain text.

Adds a regression test that gives the live session a json_schema
outputFormat and asserts the fork's options carry none.

Generated-By: PostHog Desktop
Task-Id: 13761e40-4243-459f-86d3-cbadf3174f28
The command menu merged /btw into every session's suggestions, so on a
session that cannot answer side questions (for example a codex session,
or the new-task composer with no session) picking /btw dead-ended in an
error toast. getCommandSuggestions now filters /btw out unless
sessionSupportsSideQuestion is true, reusing the same capability check
the runtime callback uses. The command's own runtime guard stays for
users who type /btw by hand.

Adds parameterized cases asserting /btw shows on a claude session and is
hidden on a codex session and when there is no session.

Generated-By: PostHog Desktop
Task-Id: 13761e40-4243-459f-86d3-cbadf3174f28
@charlesvien
charlesvien force-pushed the posthog-code/btw-side-question branch from 256ccd4 to ac26fe3 Compare August 20, 2026 20:17
@charlesvien charlesvien added the stamphog Request AI approval (no full review) label Aug 20, 2026 — with PostHog

Copy link
Copy Markdown
Member Author

Resolved the merge conflict flagged on this PR. It is MERGEABLE again and CI is green on ac26fe3b (83 passing, 0 failing).

Why it surfaced here. The base branch posthog-code/btw-side-question-backend had fallen behind master. A stacked PR is evaluated against its parent merged with master, so that drift shows up as a conflict on this layer rather than on the parent. The base was still a strict ancestor of this head, so nothing between the two branches actually conflicted.

How I updated the stack (bottom-up, so master's changes never enter this PR's diff):

  • Merged master into the base branch server-side, as a two-parent merge. Conflict-free, and #80023's own diff is still the same 7 files.
  • Rebased this branch onto the updated base and republished it signed.

The two real collisions, both additive and both resolved by keeping each side:

  • packages/shared/src/index.ts — master added TRANSCRIPT_TAIL_WINDOW to the same ./sessions export block where this branch adds sessionSupportsSideQuestion. Both are exported now.
  • packages/core/src/sessions/sessionService.ts — master added readTurnAgentText and exported classifyTurnEventKind right where this branch adds its capability reader. Kept master's helper and its export, and this branch's later readCapabilities refactor of readSteering applies on top unchanged.

Verification. This PR's file set is byte-identical to before the update — the same 32 files, and git diff --name-only base...HEAD matches exactly. The base is an ancestor of the head and the branch is not behind it.

Locally before publishing: pnpm typecheck clean across all 27 desktop packages, @posthog/shared (882), @posthog/core (3587), @posthog/ui sessions + message-editor (969), @posthog/workspace-server src/services/agent (105), and the three side-question @posthog/agent suites (54) all pass. Biome clean on both resolved files.

All 7 review threads remain resolved. The rebase dismissed the earlier stamphog approval, so I re-applied the label to get the required approval back.

🦉 via talyn.dev

stamphog[bot]
stamphog Bot previously approved these changes Aug 20, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additive desktop-only feature (new one-shot side-question fork), no dependency/CI/migration/auth/billing changes; the concurrency and dismissal edge cases a bot reviewer previously flagged are demonstrably fixed and test-covered in the current diff, and the author is the owning team with strong, current familiarity plus a clean automated security review.

  • Author wrote 100% of the modified lines and has 22 merged PRs in these paths (familiarity STRONG).
  • 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 734L, 21F substantive, 1806L/32F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1d-complex (1806L, 32F, single-area, feat)
stamphog 2.0.0b4 .stamphog/policy.yml @ ac26fe3 · reviewed head ac26fe3

Copy link
Copy Markdown
Member Author

Swept this layer again. Nothing left to change on it.

Review threads. All 7 are resolved; none unresolved or awaiting a reply.

CI. Green on the current head ac26fe3b. Every required context passes — Desktop Tests Pass, Django Tests Pass, Node.js Tests Pass, Frontend Tests Pass, Playwright tests pass, Rust Tests Pass, MCP Tests Pass, LLM Services Tests Pass, Dagster Tests Pass, Visual regression tests pass, Python code quality checks, Semgrep Checks Pass, shellcheck, Build Docker image. No check is still running, and nothing failed. The one non-green run is the Wiz SAST Scanner, which reports neutral and does not gate merge.

Mergeability. MERGEABLE, reviewDecision: APPROVED (stamphog and a human approval, both on this head). The branch is 12 commits ahead of posthog-code/btw-side-question-backend and 0 behind, and its diff is still the same 32 files, all under products/desktop/ — no base-branch files have leaked in.

What is still holding it. GitHub reports BLOCKED, and that is stack ordering rather than anything on this layer. The base branch itself carries no required checks or required reviews, so nothing here can clear it: a stacked PR stays blocked until the layer below merges. The backend layer #80023 is green but sits at REVIEW_REQUIRED with no approving review yet, so the stack cannot land bottom-first.

That needs an approval on the base layer, which is a decision for a reviewer on that PR rather than a change to this one. Once #80023 is approved and merged, this layer should go straight to mergeable with no further work.

🦉 via talyn.dev

Copy link
Copy Markdown
Member Author

Both Greptile findings were reviewed against the current head (ac26fe3). They were written against ce2848e, and commits after that one already handle them — no further change needed.

Issue 1 — "concurrent request replaces active state." ask no longer replaces a pending entry. It returns null when one is already pending for the same run, so the first question keeps the card and its answer still lands (sideQuestionStore.ts). The caller turns that null into a toast rather than a second request, and the behaviour is covered by "refuses a second question while the first is still pending" in sideQuestionStore.test.ts.

Issue 2 — "dismissal loses in-flight state." There is no one-at-a-time guard in the adapter to trip. A newer side question aborts the fork it supersedes (claude-agent.ts), so dismissing the card and asking again works: the new question runs, and the superseded one's rejection is dropped by the id/run guard in settle. Covered by "answers a newer side question and aborts the one it supersedes" (claude-agent.side-question.test.ts) and "does not let a stale answer clobber a question asked after a dismiss" (sideQuestionStore.test.ts).

🦉 via talyn.dev

Copy link
Copy Markdown
Member Author

Swept this layer again on ac26fe3b. Nothing left to change here — the only thing holding it is on the layer below.

Review threads. All 7 resolved, none awaiting a reply.

CI. Green: 83 passing, 0 failing, on the current head. The one non-green run is the Wiz SAST Scanner, which reports neutral and does not gate merge.

Mergeability. MERGEABLE, reviewDecision: APPROVED. posthog-code/btw-side-question-backend is an ancestor of this head and the branch is 0 commits behind it. The diff is still the same 32 files, all under products/desktop/ — nothing from the base branch has leaked in.

What is holding it. Stack ordering, not this layer. #80023 is no longer a draft, but it has not been approved yet, so it cannot land and this layer stays BLOCKED behind it. I applied the stamphog label there to get it an automated approval; the verdict came back REFUSED, citing an unresolved reviewer finding on products/tasks/backend/presentation/views/api.py — the side_question command has no dedicated throttle or per-run concurrency guard, and the existing usage check is a non-atomic snapshot that fails open.

That finding is about the backend command's rate limiting, which lives entirely in #80023's diff. Picking a limit (per user, per run, per organization, and at what rate) is a product call rather than a mechanical fix, so I have not made it from this layer. Once it is settled there and #80023 merges, this PR should go straight to mergeable with no further change.

🦉 via talyn.dev

Copy link
Copy Markdown
Member Author

The stack blocker is cleared. This layer is unchanged — nothing needed fixing here — but the layer below it now has what it was missing.

What changed. #80023 was sitting at REVIEW_REQUIRED because of one open review thread: a bot finding on the task-run command endpoint about side questions having no dedicated throttle or per-run concurrency guard. That thread already carried a reasoned decline — side_question is the most-gated method on that endpoint, running both the access check and the usage check, while the throttling gap it describes belongs to the whole command surface and predates the change. The reply was there, the thread just was never resolved. I resolved it and re-applied the stamphog label, and it came back APPROVED.

State now, on ac26fe3b: 83 checks passing, 0 failing. All 7 review threads resolved. reviewDecision: APPROVED, mergeable: MERGEABLE, 0 commits behind posthog-code/btw-side-question-backend, and the diff is still the same 32 files, all under products/desktop/. #80023 is green and approved too.

On the BLOCKED label. Both layers still report it, including the approved, green one at the bottom. That is the repo configuration rather than anything outstanding: direct merges are blocked by ruleset and everything lands through the Trunk queue, so BLOCKED is the steady state for any PR here. The stack is ready to enqueue whenever a maintainer wants it.

🦉 via talyn.dev

Copy link
Copy Markdown
Member Author

Swept this layer again on ac26fe3b. Unchanged and clean — and the one thing I flagged as holding it last time has cleared.

Review threads. All 7 resolved, none awaiting a reply. The two Greptile top-level findings were answered against this head in an earlier comment; nothing new has come in since.

CI. Green on the current head: 41 passing, 0 failing, nothing still running. The single non-green run is the Wiz SAST Scanner at neutral, which does not gate merge.

Mergeability. MERGEABLE, reviewDecision: APPROVED. posthog-code/btw-side-question-backend is an ancestor of this head and the branch is 0 commits behind it. The diff is still the same 32 files, all under products/desktop/ — nothing from the base branch or master has leaked in.

What changed since the last sweep. #80023 picked up an approving review, so its REVIEW_REQUIRED state is gone. It now reports MERGEABLE with reviewDecision: APPROVED and a green matrix, which means the stack can land bottom-first whenever someone enqueues it.

This layer still reads BLOCKED, and that is stack ordering rather than anything here: GitHub keeps the upper layer blocked until the layer below merges. I have not enqueued anything, since landing the stack is a call for a maintainer rather than a mechanical fix.

🦉 via talyn.dev

Copy link
Copy Markdown
Member Author

Swept this layer again on ac26fe3b. Nothing needed changing here, but I found and cleared a real CI blocker one layer down, and pinned the exact reason the stack is still held.

This layer. All 7 review threads resolved. CI green on the current head: 87 passing, 0 failing, nothing still running (the single non-green run is the Wiz SAST Scanner at neutral, which does not gate merge). MERGEABLE, reviewDecision: APPROVED with both a human and a stamphog approval on this head. Verified locally that posthog-code/btw-side-question-backend is an ancestor and the branch is 0 commits behind it, and that the diff is still the same 32 files, all under products/desktop/ — nothing from the base has leaked in.

Cleared on the layer below. Build Docker image is a required context on master, and on #80023 the Container Images CI run holding it had been cancelled, so the required check never reported. I re-ran that workflow; it now completes and the check reports, so every required context on that head is satisfied. No push, no branch change.

What is still holding the stack. #80023 has reviewDecision: APPROVED, but that approval is stamphog's alone. The master ruleset sets require_extra_approval_for_unattributed_changes, so a bot approval on its own is not enough there — it needs one human approval before it can land. This layer already has one; the layer below does not.

That is the only thing left, and it is not something I can supply. Once #80023 picks up a human approval and merges, this layer should go straight to mergeable.

🦉 via talyn.dev

Copy link
Copy Markdown
Member Author

Re-verified this layer on ac26fe3b. It is clean, and nothing on it can change its state.

Review threads. 7 total, 0 unresolved, none awaiting a reply.

CI. statusCheckRollup is SUCCESS on the current head — 87 passing, 0 failing, nothing pending. The single non-green run is the Wiz SAST Scanner at neutral, which does not gate merge.

Merge state. MERGEABLE, reviewDecision: APPROVED. Verified locally that posthog-code/btw-side-question-backend is an ancestor of the head, that the branch is 0 commits behind it, and that the diff is still 32 files, all under products/desktop/ — no base-branch content has leaked in.

Why it still reads BLOCKED. The base ref carries only a signature rule, so nothing on this PR's own gate is failing. It is the stack: a child PR stays blocked until its parent lands, and #80023 has not.

New detail on the parent. The automated approval path there is already exhausted, so re-triggering it will not help — the stamphog label is applied and stamphog has already approved. Every required context on that head passes and it has no unresolved threads. What remains is the master ruleset's extra approval for unattributed changes: with charlesvien's merge commits on haacked's PR, one bot approval is not enough, and it needs a human approving review. That is the only thing holding the stack, and it is not something I can supply.

🦉 via talyn.dev

Base automatically changed from posthog-code/btw-side-question-backend to master August 21, 2026 16:11
@stamphog
stamphog Bot dismissed their stale review August 21, 2026 16:11

The PR was retargeted to a different base branch, so the approved diff is no longer what was reviewed. Stamphog re-reviews automatically.

@talyn-app

talyn-app Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

/trunk merge

stamphog[bot]
stamphog Bot previously approved these changes Aug 21, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new backend side_question command sits in public-API/quota territory, but it's gated by the same access and usage-limit checks as other commands, has dedicated backend tests, a human APPROVED review on the current head (@dmarticus), a clean security-bot pass, and the two Greptile concurrency concerns were verifiably fixed (tests confirm the fix). The author's STRONG familiarity with nearly all touched lines further covers the cross-team backend files.

  • Author wrote 97% of the modified lines and has 38 merged PRs in these paths (familiarity STRONG).
  • dmarticus reviewed the current head.
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 757L, 23F substantive, 1926L/39F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1d-complex (1926L, 39F, two-areas, feat)
stamphog 2.0.0b4 .stamphog/policy.yml @ ac26fe3 · reviewed head ac26fe3

Generated-By: PostHog Desktop
Task-Id: 1c4a2e91-405e-4984-a746-2035fbf9d616
@stamphog
stamphog Bot dismissed their stale review August 21, 2026 16:16

A new stamphog review started for this PR — the fresh verdict replaces this approval.

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a well-isolated feature (tool-less transcript fork) with thorough tests covering the isolation guarantees (empty tools/mcpServers/settingSources, deny-all canUseTool, abort semantics); the author is on the owning team with STRONG familiarity, and the two substantive Greptile findings were verified against the current diff as actually addressed (the store's ask guard and the adapter's supersede/abort logic).

  • Author wrote 100% of the modified lines and has 22 merged PRs in these paths (familiarity STRONG).
  • 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 734L, 21F substantive, 1806L/32F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1d-complex (1806L, 32F, single-area, feat)
stamphog 2.0.0b4 .stamphog/policy.yml @ ff939e5 · reviewed head ff939e5

@hosthog

hosthog Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

HostHog preview — posthog-desktop-web

The previews for this PR have been torn down and no longer serve.

@talyn-app

talyn-app Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

/trunk merge

Copy link
Copy Markdown
Member Author

The stack is gone — #80023 merged, GitHub retargeted this PR onto master, and I brought master in. This layer is clean on ff939e5b.

Why an update was needed. #80023 landed as a squash, so its commits are not ancestors of master. That pushed the merge base back and made this PR's diff show 39 files — its own 32 plus the 7 backend files that had already shipped. Merging master in server-side (two-parent, ff939e5b) restored the merge base, and the diff is back to the same 32 files, all under products/desktop/. master is now an ancestor and the branch is 0 commits behind.

The merge was conflict-free, but it moved a fair amount of desktop code, so I verified locally rather than trusting that:

  • Typecheck clean across agent, core, shared, ui, workspace-server, and host-router.
  • Every side-question test passes: 12 in claude-agent.side-question.test.ts, 8 in sessionServiceSideQuestion.test.ts, 6 in sideQuestionStore.test.ts, 6 in SideQuestionCard.test.tsx, plus the command, suggestion, and schema cases.
  • Wider suites on the merged tree: @posthog/ui sessions 857 passing, @posthog/core sessions 495 passing, @posthog/workspace-server src/services/agent 105 passing.

Current state. CI green on the head: 86 passing, 0 failing, nothing running. Every required context is satisfied, including Desktop Tests Pass. The one non-green run is the Wiz SAST Scanner at neutral, which does not gate merge. All 7 review threads resolved, reviewDecision: APPROVED, mergeable: MERGEABLE.

I also fixed the description's opening line, which still said the backend half merges first.

On BLOCKED. Nothing outstanding on this PR. The master ruleset blocks direct pushes and merges, so every PR here reads BLOCKED until the Trunk queue lands it. Ready to enqueue whenever a maintainer wants it.

🦉 via talyn.dev

@talyn-app

talyn-app Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

/trunk merge

@trunk-io

trunk-io Bot commented Aug 21, 2026

Copy link
Copy Markdown

This PR is already queued as a stacked merge. Cancel it first to re-submit.

@trunk-io
trunk-io Bot merged commit 1ac33ef into master Aug 21, 2026
213 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/btw-side-question branch August 21, 2026 17:05
@deployment-status-posthog

deployment-status-posthog Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-08-21 17:31 UTC Run
prod-us ✅ Deployed 2026-08-21 17:51 UTC Run
prod-eu ✅ Deployed 2026-08-21 17:51 UTC Run

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

Labels

feature/desktop Feature Tag: Desktop stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants