feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability - #75

Merged
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli
Aug 11, 2026
Merged

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability#75
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli

Conversation

@dastratakos

@dastratakosdastratakos commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The hosted product (ReviewStage/stage) is sunsetted; this PR vendors its unported functionality into the CLI so users can continue on stagereview. Everything is ported as closely as possible to the hosted implementation (code, prompts, constants, and tests copied verbatim where the architectures align), based on a six-dimension gap analysis of the two repos' code and git histories.

Changes

Chapter generation — prompts (skills/stage-chapters/SKILL.md)

  • Full risk-classification rubric with riskLevel/riskReasons outputs (hosted #896)
  • Prologue rootCause section (hosted #1051), chapter-level mermaid diagram guidance (hosted #771)
  • Restored hosted's full exemplar density, PR title/body + additional-instructions context, keyChange inline-markdown rule

Chapter generation — pipeline & data model (packages/cli, packages/types)

  • No-newline markers filtered from parsed hunks (hosted #1132) with regression tests
  • Hosted ignore semantics: full DEFAULT_IGNORE_PATTERNS (7 new lockfiles, #871), one case-insensitive matcher so .stageignore! negations re-include defaults
  • Zero-hunk files (pure renames) included in Other Changes via the header-only sentinel
  • riskLevel/riskReasons + rootCause across types, DB (+migration), ingestion, routes
  • What-to-Review ordering by file order then start line (#865/#970); dense 0-based chapterIndex
  • prep: PULL REQUEST (title/body, 4k cap), STATS, and ADDITIONAL INSTRUCTIONS sections (.stageinstructions file + --instructions flag, hosted #1036 analog)
  • Repair-not-reject line refs; pre-assembled chapter files no longer bypass validation; literal-\n unescaping; consistent diff prefixes

Review UI (packages/web)

  • Activity tab: conversation timeline (gh-api-backed), review cards, review-comment diff previews (#1105), events column, read-only reactions
  • Continuous chapter review mode (Page/Scroll, #1083) with active-chapter preservation on mode switch
  • Risk badges, per-chapter/per-file comment counts, remaining-review-lines sticky header (#1107)
  • Markdown stack: shiki highlighting (#796/#826), mermaid in chapter summaries (#771), GitHub image proxy for private attachments (#820)
  • Diff extras: image diffs (base64 over the wire), full previews for moved files (#1106), virtualized file list, minimize inline comments
  • Small fixes: bot reviewer badges (#1131), resolve-button placement (#1133), sticky-header z-index (#1019), CI popover scroll (#1061), min-height floor (#1014), annotation tinting (#757/#1016), index j/k (#835), dark default theme (#819), derived chapter viewed state (#1021)
  • GitHub: stale pending-review recovery (#1072), label management (#1071)
  • GitHub viewed-file sync: marks/unmarks files on GitHub per hosted's rules and unions GitHub's viewed state into the local view state (PR runs, best-effort)
  • Merge: ruleset-aware allowed merge methods (#1057), single inline merge action with status chip and queue position (#1052)
  • Stacked-PR detection and navigation with ⌘⇧↑/⌘⇧↓ (#1049); entries with a local run navigate to it, others link to GitHub
  • Review panel keyboard shortcuts: ⌘J toggle, ⌘↩ submit

Configurability

  • Diff typography (font/size/line height/ligatures, #974), per-app-theme syntax themes (62), app text size (#1038), chapter panel position (#898), What-to-Review visibility (#1077)

Descoped (depend on hosted backends): Stagent chat, ⌘K action board, reaction toggling, timeline-side comment mutations, mobile layouts, AI chapter editing/regeneration UI.

Testing

  • pnpm typecheck, pnpm lint, pnpm test all green (73 files, 643 tests — including regression suites ported from hosted for the diff parser, file filtering, other-changes, line-ref repair, remaining-line counts, timeline assembly, full-file previews, and review recovery)
  • pnpm build (SPA + CLI bundle) succeeds

Open workspace in Conductor


Summary by cubic

Vendors the hosted Stage experience into the CLI so teams can keep using stagereview after the hosted app sunset, with generation parity, a full review UI, GitHub viewed-file sync, labels/stack/merge parity, and configurable display/settings. Also aligns the continuous chapter panel header with paged mode by reusing the shared chapter navigator, with in-page navigation to avoid remounts.

  • Bug Fixes

    • Drop stale comment‑draft store writes that settle after stack navigation.
    • Count outdated GitHub review threads via their original coordinates and carry them as a null‑anchored variant so file and chapter comment badges stay accurate.
    • Restore j/k navigation and scroll‑into‑view by typing the --content-top CSS variable, fixing keyboard and deep‑link scrolling in Files and chapter pages.
  • Refactors

    • Drop the legacy syntax‑theme localStorage migration; the curated single‑key setting now resets to defaults on upgrade. Remove hosted‑Stage provenance comments (no behavior change).

Written for commit 0f37e90. Summary will update on new commits.

Review in cubic

Port the hosted narrative/summary agent prompt content verbatim: full risk
classification rubric with riskLevel/riskReasons output fields, prologue
rootCause section, chapter-level mermaid diagram guidance, restored exemplar
density for motivation/outcome/keyChanges/focusAreas/complexity, keyChange
inline-markdown rule, and PR title/body + additional-instructions context
consumption. Fix stale hunks.txt/commits.txt references.
…e CLI
- Filter no-newline markers out of parsed hunk lines (hosted #1132) with
regression tests
- Vendor hosted DEFAULT_IGNORE_PATTERNS (adds 7 missing lockfiles, #871) and
hosted ignore semantics: one case-insensitive matcher so .stageignore
negations can re-include default-ignored files
- Include zero-hunk files (pure renames/moves) in the Other Changes chapter
via the HEADER_ONLY_OLD_START sentinel
- Add riskLevel/riskReasons to chapters (hosted #896) and rootCause to the
prologue (hosted #1051) across types, DB schema (+migration), ingestion,
persistence, and routes
- Order What to Review items by chapter file order, then start line
(hosted #865/#970)
- prep: add PULL REQUEST (title/body, 4k truncation), STATS, and ADDITIONAL
INSTRUCTIONS sections; instructions come from .stageinstructions and a new
--instructions flag (hosted #1036 analog)
- Repair-not-reject line refs like hosted: drop the startLine<=endLine refine
and lineRefs.min(1); sanitize instead, and stop bypassing validation for
pre-assembled chapter files
- Unescape literal \n sequences in summaries/key changes (hosted #772)
- Assign dense 0-based chapterIndex like hosted persist
- Force diff prefixes in view-time git diff args
- Add /api/image-proxy route for GitHub comment attachments (hosted #820)
- Shiki CodeBlock + highlighter singleton for fenced code blocks in all
markdown (hosted #796/#826)
- Render fenced mermaid blocks through the shared MermaidDiagram so chapter
summaries get diagrams (hosted #771)
- Rewrite GitHub attachment image URLs through /api/image-proxy so private
images load (hosted #820)
- Show review status badges for bot reviewers (hosted #1131)
- Move inline comment resolve button next to reply (hosted #1133)
- Keep sticky overview header above scrolling lists (hosted #1019)
- Scroll CI checks popover when the expanded list overflows (hosted #1061)
- Anchor the content column to the viewport min-height (hosted #1014)
- Tint inline comment annotation rows by diff line type (hosted #757/#1016)
- Wire j/k chapter navigation on the overview page (hosted #835)
- Default to dark theme, including the pre-hydration script (hosted #819)
- Derive chapter viewed state from file views (hosted #1021)
- Display chapters as order + 1 now that the wire order is the dense
0-based chapter index (hosted parity)
- Diff typography: font family presets, size, line height, ligatures
(hosted #974), with webfont loading in index.html
- Full syntax theme set with independent light/dark selection per app
theme, migrating the legacy single-key setting (hosted #974)
- App text size preference with pre-render application (hosted #1038)
- What to Review visibility consumption in chapter summaries (hosted #1077)
- Minimize inline comments setting, indicator component, and 'i' shortcut
- Chapter view (Page/Scroll) settings row
…header
- RiskBadge/RiskChip with riskReasons tooltip on the index list and
chapter panel (hosted #896/#1012)
- Chapter title block and actions menu with panel position and What to
Review controls (hosted #1012/#898/#1077)
- Left/top/right chapter panel positions (hosted #898)
- Real per-chapter and per-file comment counts from review threads,
replacing NO_COMMENT_COUNTS stubs
- Remaining review lines in the sticky header with total tooltip
(hosted #1107), with ported hosted tests
- Unmarking a chapter also clears its file views on the detail page
- Detect GITHUB_REVIEW_NOT_PENDING on review submit and recover
server-side: retry, dedupe an already-submitted decision, or open a
fresh review (hosted #1072), with ported test scenarios
- GitHub label display and add/remove management in the PR header with
luminance-based chip colors, gated on write access (hosted #1071),
backed by new /api label routes with CSRF guard and tests
- Minimize inline comments: collapsed annotation rows render the indicator
chip, 'i' toggles, composer forces rows open (hosted #1016 + minimize flow)
- Diff typography CSS variables feed Pierre from the new settings
- Per-app-theme syntax themes passed straight to Pierre (hosted parity)
- Image diff viewer with side-by-side layouts (hosted); the diff route now
ships base64 contents for binary images and rename-header contents for
pure renames so images and moved-file previews render locally
- Full-content previews for moved/renamed files (hosted #1106) with tests
- Virtualized file list via react-virtuoso with hosted's tuning; collapse
keeps rendered DOM and compensates sticky-header scroll
Port the Scroll chapter view (hosted #1083): one virtualized stream of all
chapter diffs with sticky per-chapter narrative panels, scroll-driven
active-chapter tracking, completion auto-advance, key-change focus, and
deep-link normalization between paged and continuous modes. Switching back
to Page mode lands on the chapter that was active in the stream via the
vendored ChapterViewState context.
- GitHub timeline assembly (issue comments, reviews with grouped comments
and resolved threads, commits/label/assign/merge events, reactions) via
gh api, ported from hosted's conversation module, with route + tests
- Conversation components: discussion timeline with hide-resolved and
hide-bots switches, review cards with sticky file headers (post-#1139),
review comment diff previews honoring diff settings (hosted #1105),
events/commits column, read-only reaction bars, loading skeleton
- Activity tab in the run layout, gated to PR runs, with comment count
- ChapterViewStateProvider mounted in the run layout
Descoped from hosted: reaction toggling and timeline-side comment
mutations (no local backend for those write paths).
Comment threadpackages/cli/src/routes/image-proxy.ts
Comment threadpackages/cli/src/runs/review.ts
@cursor
cursorBot requested a review from charleslpanAugust 10, 2026 04:38

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, Security Agent reported an unresolved high-severity issue, and this PR is above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:5d995b7d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/build-other-changes.ts
Comment threadpackages/cli/src/show.ts Outdated
Comment threadpackages/cli/src/github/timeline.ts
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/cli/src/routes/diff.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx Outdated
Comment threadpackages/web/src/routes/chapter-detail-page.tsx
Comment threadpackages/web/src/lib/use-timeline.ts

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 128 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/routes/continuous-chapters-page.tsx Outdated
Comment threadpackages/web/src/lib/full-file-preview.ts
Comment threadpackages/cli/src/github/review.ts Outdated
Comment threadpackages/web/src/lib/remaining-line-counts.ts Outdated
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx
Comment threadpackages/cli/src/__tests__/timeline-route-harness.ts Outdated
Comment threadpackages/web/src/components/chapter/risk-badge.tsx
Comment threadpackages/web/src/components/conversation/events-timeline.tsx
mod+j toggles the review tray and mod+enter submits when focus is inside
it, matching hosted's pending-review-panel bindings. Also registers the
stacked-PR navigation shortcuts for the upcoming stack nav.
- Respect base-branch ruleset merge methods: intersect repo-level flags
with PULL_REQUEST rule allowances and drop MERGE under required linear
history (hosted #1057), with all 10 hosted ruleset tests ported
- Replace the merge popover with a status chip and a single inline action
driven by getMergeAction — Merge/Auto-merge/Disable auto-merge/Leave
queue — gated on the per-PR viewerCanEnableAutoMerge flag (hosted #1052),
with the 14 decision-function tests and the xs button variant
- Show merge queue position in the status pill (hosted #1052)
Derive PR stacks on read from open base->head branch chains (hosted #1049,
algorithm and 12-case test suite ported verbatim) and show hosted's stack
navigator in the PR header. CLI adaptation: entries with a local run for
the same repo and PR number navigate to that run preserving the current
tab; entries without one open the PR on GitHub. mod+shift+up/down step
through the stack.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot skipped, an unresolved high-severity Security Agent finding remains, unresolved review threads are still open, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 21 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-action.ts
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/web/src/lib/utils/pull-request-status.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:570505304f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/routes/diff.ts Outdated
Comment threadpackages/web/src/lib/comment-counts.ts Outdated
Comment threadpackages/web/src/components/chapter/pierre-diff-viewer.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/cli/src/instructions.ts Outdated
Comment threadpackages/cli/src/github/pull-request-stack.ts Outdated
Comment threadpackages/web/src/routes/continuous-chapters-page.tsx
- Query and surface subjectType on pending comments so file-level
comments show hosted's File icon instead of being mislabeled Outdated
- Match hosted's panel: 520px popover, thin scrollbar on the pending
list, ShortcutTooltip trigger with the mod+j hint
- The list already included pending replies and renders through the same
compact layout as hosted's PendingCommentsList; the shared
CommentMarkdownEditor was already in place for the review body
@dastratakosdastratakos changed the title Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityfeat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityAug 10, 2026
Comment threadpackages/cli/src/show.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot completed as skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, and unresolved review threads remain above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

Pierre 1.1.20 isolates its pre element, flattening the diff into one paint
unit, so the light-DOM highlight boxes (z-2/z-3) painted over comment rows
(which Pierre pins at z-index 2). Release the isolation inside our already
isolated diff container and lift annotation rows to z-index 4 so comments
render above highlights while highlights stay visible over code lines.
The virtualized list pads the top of every item, but the page shell already
pads above the list, doubling the space before the first diff on the chapter
detail page and the Files tab. Skip the first item's padding to restore the
pre-virtuoso space-y-4 spacing. The continuous reader keeps hosted's
uniform padding — there the first file's gap separates it from the chapter
panel by design.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, unresolved review threads remain, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ba5b0d2. Configure here.

Comment threadpackages/cli/src/__tests__/pull-request.routes.test.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved high-severity finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ba5b0d2b1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/web/src/lib/use-reviewer-manager.ts
Comment threadpackages/cli/src/unescape.ts
Comment threadpackages/web/src/components/pull-request/pull-request-stack-nav.tsx Outdated
Comment threadpackages/cli/src/routes/view-state.ts
Comment threadpackages/web/src/routes/pull-request-layout.tsx Outdated

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b9b3e7. Configure here.

Comment threadpackages/cli/src/github/pull-request.ts Outdated

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/__tests__/view-state-github-harness.ts">
<violation number="1" location="packages/cli/src/__tests__/view-state-github-harness.ts:130">
P3: The shim hardcodes state OPEN on every pr list response, so the routes tests using this harness cannot exercise the closed/merged-PR fallback in getPullRequestOrThrow (pull-request.ts:196, listParsed.data.find(pr => pr.state === OPEN) ?? listParsed.data[0]). The available options (branchPrNumber or null) only cover the open-PR and no-PR cases, leaving the newest-closed-PR fallback and prefer-open ordering untested by the integration suite. Consider exposing a configurable pr-list entries option on the harness so that fallback gets regression coverage.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/cli/src/__tests__/view-state-github-harness.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The tray's pending list now reuses the Activity tab's ReviewThreadItem —
file header, diff-hunk line preview, thread header, and comment body —
instead of a bespoke card. The review query selects diffHunk, databaseId,
and original line coordinates so each pending draft maps onto the
Discussion panel's Thread shape; FILE and outdated drafts skip the
preview gracefully.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cd06993e8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/web/src/app/runs.$runId.tsx
Comment threadpackages/cli/src/github/review.ts
A comment submission that settles after the run switches must not close or
error a draft in the sibling run's store. Each write now carries the reset
generation its caller rendered with; the store drops writes from a
superseded generation.
Hosted's commentMatchesHunk falls back to original_line against the
old-file range for outdated comments (line nulled by GitHub); the CLI
dropped them from the wire entirely, so file and chapter badges lost
existing discussions the Activity tab still shows. Outdated line threads
now ride the wire as a null-anchored variant carrying their frozen
original coordinates — inline rendering already skips null anchors, and
the count builders apply hosted's fallback.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/comment-counts.ts
The twenty-fifth-round change made the layout set --content-top to
calc(3rem + <nav>px). Untyped custom properties compute to their raw
token stream, so the scroll code's parseFloat(getComputedStyle(...))
became NaN — Virtuoso silently rejects a NaN scrollToIndex offset,
killing j/k, v-advance, file-tree click-to-scroll, and line deep links
on the Files tab and chapter pages (the continuous-mode readers guard
with isFinite and only lost their sticky offset). Registering the
property as a typed <length> makes it compute to resolved pixels, fixing
every reader while keeping the text-size scaling.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The single-key curated theme value now just resets to defaults on
upgrade instead of seeding the per-app-theme keys.
Comments recording where code was vendored from (hosted file paths, PR
numbers, "matches hosted" equivalences) are review-time noise now that
the port is done. Rationales that referenced hosted are reworded to
state the constraint on their own; the only remaining "hosted" mentions
describe GitHub-hosted URLs and self-hosted git remotes.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit acfe195. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold. Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 72 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/use-diff-settings.tsx
The continuous panel now renders the shared ChapterNavigator — icon
viewed-toggle on the left, prev/next steppers, the chapter dropdown
selector, and the actions menu — instead of its bespoke ordinal header,
and drops its bg-card tint. The navigator takes an optional in-page
navigation override because the continuous reader navigates by
scrolling its stream: a /chapters/N link there would remount the whole
reader through the normalizing redirect.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f37e90. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with unresolved findings still open, and this PR exceeds the medium approval threshold. Human review is needed; a reviewer is already assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@dastratakos
dastratakos merged commit e8f485f into mainAug 11, 2026
8 checks passed
@dastratakos
dastratakos deleted the dastratakos/vendor-hosted-stage-into-cli branch August 11, 2026 23:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dastratakos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability - #75

Merged
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli
Aug 11, 2026
Merged

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability#75
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli

Conversation

@dastratakos

@dastratakosdastratakos commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The hosted product (ReviewStage/stage) is sunsetted; this PR vendors its unported functionality into the CLI so users can continue on stagereview. Everything is ported as closely as possible to the hosted implementation (code, prompts, constants, and tests copied verbatim where the architectures align), based on a six-dimension gap analysis of the two repos' code and git histories.

Changes

Chapter generation — prompts (skills/stage-chapters/SKILL.md)

  • Full risk-classification rubric with riskLevel/riskReasons outputs (hosted #896)
  • Prologue rootCause section (hosted #1051), chapter-level mermaid diagram guidance (hosted #771)
  • Restored hosted's full exemplar density, PR title/body + additional-instructions context, keyChange inline-markdown rule

Chapter generation — pipeline & data model (packages/cli, packages/types)

  • No-newline markers filtered from parsed hunks (hosted #1132) with regression tests
  • Hosted ignore semantics: full DEFAULT_IGNORE_PATTERNS (7 new lockfiles, #871), one case-insensitive matcher so .stageignore! negations re-include defaults
  • Zero-hunk files (pure renames) included in Other Changes via the header-only sentinel
  • riskLevel/riskReasons + rootCause across types, DB (+migration), ingestion, routes
  • What-to-Review ordering by file order then start line (#865/#970); dense 0-based chapterIndex
  • prep: PULL REQUEST (title/body, 4k cap), STATS, and ADDITIONAL INSTRUCTIONS sections (.stageinstructions file + --instructions flag, hosted #1036 analog)
  • Repair-not-reject line refs; pre-assembled chapter files no longer bypass validation; literal-\n unescaping; consistent diff prefixes

Review UI (packages/web)

  • Activity tab: conversation timeline (gh-api-backed), review cards, review-comment diff previews (#1105), events column, read-only reactions
  • Continuous chapter review mode (Page/Scroll, #1083) with active-chapter preservation on mode switch
  • Risk badges, per-chapter/per-file comment counts, remaining-review-lines sticky header (#1107)
  • Markdown stack: shiki highlighting (#796/#826), mermaid in chapter summaries (#771), GitHub image proxy for private attachments (#820)
  • Diff extras: image diffs (base64 over the wire), full previews for moved files (#1106), virtualized file list, minimize inline comments
  • Small fixes: bot reviewer badges (#1131), resolve-button placement (#1133), sticky-header z-index (#1019), CI popover scroll (#1061), min-height floor (#1014), annotation tinting (#757/#1016), index j/k (#835), dark default theme (#819), derived chapter viewed state (#1021)
  • GitHub: stale pending-review recovery (#1072), label management (#1071)
  • GitHub viewed-file sync: marks/unmarks files on GitHub per hosted's rules and unions GitHub's viewed state into the local view state (PR runs, best-effort)
  • Merge: ruleset-aware allowed merge methods (#1057), single inline merge action with status chip and queue position (#1052)
  • Stacked-PR detection and navigation with ⌘⇧↑/⌘⇧↓ (#1049); entries with a local run navigate to it, others link to GitHub
  • Review panel keyboard shortcuts: ⌘J toggle, ⌘↩ submit

Configurability

  • Diff typography (font/size/line height/ligatures, #974), per-app-theme syntax themes (62), app text size (#1038), chapter panel position (#898), What-to-Review visibility (#1077)

Descoped (depend on hosted backends): Stagent chat, ⌘K action board, reaction toggling, timeline-side comment mutations, mobile layouts, AI chapter editing/regeneration UI.

Testing

  • pnpm typecheck, pnpm lint, pnpm test all green (73 files, 643 tests — including regression suites ported from hosted for the diff parser, file filtering, other-changes, line-ref repair, remaining-line counts, timeline assembly, full-file previews, and review recovery)
  • pnpm build (SPA + CLI bundle) succeeds

Open workspace in Conductor


Summary by cubic

Vendors the hosted Stage experience into the CLI so teams can keep using stagereview after the hosted app sunset, with generation parity, a full review UI, GitHub viewed-file sync, labels/stack/merge parity, and configurable display/settings. Also aligns the continuous chapter panel header with paged mode by reusing the shared chapter navigator, with in-page navigation to avoid remounts.

  • Bug Fixes

    • Drop stale comment‑draft store writes that settle after stack navigation.
    • Count outdated GitHub review threads via their original coordinates and carry them as a null‑anchored variant so file and chapter comment badges stay accurate.
    • Restore j/k navigation and scroll‑into‑view by typing the --content-top CSS variable, fixing keyboard and deep‑link scrolling in Files and chapter pages.
  • Refactors

    • Drop the legacy syntax‑theme localStorage migration; the curated single‑key setting now resets to defaults on upgrade. Remove hosted‑Stage provenance comments (no behavior change).

Written for commit 0f37e90. Summary will update on new commits.

Review in cubic

Port the hosted narrative/summary agent prompt content verbatim: full risk
classification rubric with riskLevel/riskReasons output fields, prologue
rootCause section, chapter-level mermaid diagram guidance, restored exemplar
density for motivation/outcome/keyChanges/focusAreas/complexity, keyChange
inline-markdown rule, and PR title/body + additional-instructions context
consumption. Fix stale hunks.txt/commits.txt references.
…e CLI
- Filter no-newline markers out of parsed hunk lines (hosted #1132) with
regression tests
- Vendor hosted DEFAULT_IGNORE_PATTERNS (adds 7 missing lockfiles, #871) and
hosted ignore semantics: one case-insensitive matcher so .stageignore
negations can re-include default-ignored files
- Include zero-hunk files (pure renames/moves) in the Other Changes chapter
via the HEADER_ONLY_OLD_START sentinel
- Add riskLevel/riskReasons to chapters (hosted #896) and rootCause to the
prologue (hosted #1051) across types, DB schema (+migration), ingestion,
persistence, and routes
- Order What to Review items by chapter file order, then start line
(hosted #865/#970)
- prep: add PULL REQUEST (title/body, 4k truncation), STATS, and ADDITIONAL
INSTRUCTIONS sections; instructions come from .stageinstructions and a new
--instructions flag (hosted #1036 analog)
- Repair-not-reject line refs like hosted: drop the startLine<=endLine refine
and lineRefs.min(1); sanitize instead, and stop bypassing validation for
pre-assembled chapter files
- Unescape literal \n sequences in summaries/key changes (hosted #772)
- Assign dense 0-based chapterIndex like hosted persist
- Force diff prefixes in view-time git diff args
- Add /api/image-proxy route for GitHub comment attachments (hosted #820)
- Shiki CodeBlock + highlighter singleton for fenced code blocks in all
markdown (hosted #796/#826)
- Render fenced mermaid blocks through the shared MermaidDiagram so chapter
summaries get diagrams (hosted #771)
- Rewrite GitHub attachment image URLs through /api/image-proxy so private
images load (hosted #820)
- Show review status badges for bot reviewers (hosted #1131)
- Move inline comment resolve button next to reply (hosted #1133)
- Keep sticky overview header above scrolling lists (hosted #1019)
- Scroll CI checks popover when the expanded list overflows (hosted #1061)
- Anchor the content column to the viewport min-height (hosted #1014)
- Tint inline comment annotation rows by diff line type (hosted #757/#1016)
- Wire j/k chapter navigation on the overview page (hosted #835)
- Default to dark theme, including the pre-hydration script (hosted #819)
- Derive chapter viewed state from file views (hosted #1021)
- Display chapters as order + 1 now that the wire order is the dense
0-based chapter index (hosted parity)
- Diff typography: font family presets, size, line height, ligatures
(hosted #974), with webfont loading in index.html
- Full syntax theme set with independent light/dark selection per app
theme, migrating the legacy single-key setting (hosted #974)
- App text size preference with pre-render application (hosted #1038)
- What to Review visibility consumption in chapter summaries (hosted #1077)
- Minimize inline comments setting, indicator component, and 'i' shortcut
- Chapter view (Page/Scroll) settings row
…header
- RiskBadge/RiskChip with riskReasons tooltip on the index list and
chapter panel (hosted #896/#1012)
- Chapter title block and actions menu with panel position and What to
Review controls (hosted #1012/#898/#1077)
- Left/top/right chapter panel positions (hosted #898)
- Real per-chapter and per-file comment counts from review threads,
replacing NO_COMMENT_COUNTS stubs
- Remaining review lines in the sticky header with total tooltip
(hosted #1107), with ported hosted tests
- Unmarking a chapter also clears its file views on the detail page
- Detect GITHUB_REVIEW_NOT_PENDING on review submit and recover
server-side: retry, dedupe an already-submitted decision, or open a
fresh review (hosted #1072), with ported test scenarios
- GitHub label display and add/remove management in the PR header with
luminance-based chip colors, gated on write access (hosted #1071),
backed by new /api label routes with CSRF guard and tests
- Minimize inline comments: collapsed annotation rows render the indicator
chip, 'i' toggles, composer forces rows open (hosted #1016 + minimize flow)
- Diff typography CSS variables feed Pierre from the new settings
- Per-app-theme syntax themes passed straight to Pierre (hosted parity)
- Image diff viewer with side-by-side layouts (hosted); the diff route now
ships base64 contents for binary images and rename-header contents for
pure renames so images and moved-file previews render locally
- Full-content previews for moved/renamed files (hosted #1106) with tests
- Virtualized file list via react-virtuoso with hosted's tuning; collapse
keeps rendered DOM and compensates sticky-header scroll
Port the Scroll chapter view (hosted #1083): one virtualized stream of all
chapter diffs with sticky per-chapter narrative panels, scroll-driven
active-chapter tracking, completion auto-advance, key-change focus, and
deep-link normalization between paged and continuous modes. Switching back
to Page mode lands on the chapter that was active in the stream via the
vendored ChapterViewState context.
- GitHub timeline assembly (issue comments, reviews with grouped comments
and resolved threads, commits/label/assign/merge events, reactions) via
gh api, ported from hosted's conversation module, with route + tests
- Conversation components: discussion timeline with hide-resolved and
hide-bots switches, review cards with sticky file headers (post-#1139),
review comment diff previews honoring diff settings (hosted #1105),
events/commits column, read-only reaction bars, loading skeleton
- Activity tab in the run layout, gated to PR runs, with comment count
- ChapterViewStateProvider mounted in the run layout
Descoped from hosted: reaction toggling and timeline-side comment
mutations (no local backend for those write paths).
Comment threadpackages/cli/src/routes/image-proxy.ts
Comment threadpackages/cli/src/runs/review.ts
@cursor
cursorBot requested a review from charleslpanAugust 10, 2026 04:38

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, Security Agent reported an unresolved high-severity issue, and this PR is above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:5d995b7d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/build-other-changes.ts
Comment threadpackages/cli/src/show.ts Outdated
Comment threadpackages/cli/src/github/timeline.ts
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/cli/src/routes/diff.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx Outdated
Comment threadpackages/web/src/routes/chapter-detail-page.tsx
Comment threadpackages/web/src/lib/use-timeline.ts

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 128 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/routes/continuous-chapters-page.tsx Outdated
Comment threadpackages/web/src/lib/full-file-preview.ts
Comment threadpackages/cli/src/github/review.ts Outdated
Comment threadpackages/web/src/lib/remaining-line-counts.ts Outdated
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx
Comment threadpackages/cli/src/__tests__/timeline-route-harness.ts Outdated
Comment threadpackages/web/src/components/chapter/risk-badge.tsx
Comment threadpackages/web/src/components/conversation/events-timeline.tsx
mod+j toggles the review tray and mod+enter submits when focus is inside
it, matching hosted's pending-review-panel bindings. Also registers the
stacked-PR navigation shortcuts for the upcoming stack nav.
- Respect base-branch ruleset merge methods: intersect repo-level flags
with PULL_REQUEST rule allowances and drop MERGE under required linear
history (hosted #1057), with all 10 hosted ruleset tests ported
- Replace the merge popover with a status chip and a single inline action
driven by getMergeAction — Merge/Auto-merge/Disable auto-merge/Leave
queue — gated on the per-PR viewerCanEnableAutoMerge flag (hosted #1052),
with the 14 decision-function tests and the xs button variant
- Show merge queue position in the status pill (hosted #1052)
Derive PR stacks on read from open base->head branch chains (hosted #1049,
algorithm and 12-case test suite ported verbatim) and show hosted's stack
navigator in the PR header. CLI adaptation: entries with a local run for
the same repo and PR number navigate to that run preserving the current
tab; entries without one open the PR on GitHub. mod+shift+up/down step
through the stack.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot skipped, an unresolved high-severity Security Agent finding remains, unresolved review threads are still open, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 21 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-action.ts
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/web/src/lib/utils/pull-request-status.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:570505304f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/routes/diff.ts Outdated
Comment threadpackages/web/src/lib/comment-counts.ts Outdated
Comment threadpackages/web/src/components/chapter/pierre-diff-viewer.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/cli/src/instructions.ts Outdated
Comment threadpackages/cli/src/github/pull-request-stack.ts Outdated
Comment threadpackages/web/src/routes/continuous-chapters-page.tsx
- Query and surface subjectType on pending comments so file-level
comments show hosted's File icon instead of being mislabeled Outdated
- Match hosted's panel: 520px popover, thin scrollbar on the pending
list, ShortcutTooltip trigger with the mod+j hint
- The list already included pending replies and renders through the same
compact layout as hosted's PendingCommentsList; the shared
CommentMarkdownEditor was already in place for the review body
@dastratakosdastratakos changed the title Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityfeat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityAug 10, 2026
Comment threadpackages/cli/src/show.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot completed as skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, and unresolved review threads remain above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

Pierre 1.1.20 isolates its pre element, flattening the diff into one paint
unit, so the light-DOM highlight boxes (z-2/z-3) painted over comment rows
(which Pierre pins at z-index 2). Release the isolation inside our already
isolated diff container and lift annotation rows to z-index 4 so comments
render above highlights while highlights stay visible over code lines.
The virtualized list pads the top of every item, but the page shell already
pads above the list, doubling the space before the first diff on the chapter
detail page and the Files tab. Skip the first item's padding to restore the
pre-virtuoso space-y-4 spacing. The continuous reader keeps hosted's
uniform padding — there the first file's gap separates it from the chapter
panel by design.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, unresolved review threads remain, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ba5b0d2. Configure here.

Comment threadpackages/cli/src/__tests__/pull-request.routes.test.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved high-severity finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ba5b0d2b1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/web/src/lib/use-reviewer-manager.ts
Comment threadpackages/cli/src/unescape.ts
Comment threadpackages/web/src/components/pull-request/pull-request-stack-nav.tsx Outdated
Comment threadpackages/cli/src/routes/view-state.ts
Comment threadpackages/web/src/routes/pull-request-layout.tsx Outdated

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b9b3e7. Configure here.

Comment threadpackages/cli/src/github/pull-request.ts Outdated

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/__tests__/view-state-github-harness.ts">
<violation number="1" location="packages/cli/src/__tests__/view-state-github-harness.ts:130">
P3: The shim hardcodes state OPEN on every pr list response, so the routes tests using this harness cannot exercise the closed/merged-PR fallback in getPullRequestOrThrow (pull-request.ts:196, listParsed.data.find(pr => pr.state === OPEN) ?? listParsed.data[0]). The available options (branchPrNumber or null) only cover the open-PR and no-PR cases, leaving the newest-closed-PR fallback and prefer-open ordering untested by the integration suite. Consider exposing a configurable pr-list entries option on the harness so that fallback gets regression coverage.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/cli/src/__tests__/view-state-github-harness.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The tray's pending list now reuses the Activity tab's ReviewThreadItem —
file header, diff-hunk line preview, thread header, and comment body —
instead of a bespoke card. The review query selects diffHunk, databaseId,
and original line coordinates so each pending draft maps onto the
Discussion panel's Thread shape; FILE and outdated drafts skip the
preview gracefully.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cd06993e8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/web/src/app/runs.$runId.tsx
Comment threadpackages/cli/src/github/review.ts
A comment submission that settles after the run switches must not close or
error a draft in the sibling run's store. Each write now carries the reset
generation its caller rendered with; the store drops writes from a
superseded generation.
Hosted's commentMatchesHunk falls back to original_line against the
old-file range for outdated comments (line nulled by GitHub); the CLI
dropped them from the wire entirely, so file and chapter badges lost
existing discussions the Activity tab still shows. Outdated line threads
now ride the wire as a null-anchored variant carrying their frozen
original coordinates — inline rendering already skips null anchors, and
the count builders apply hosted's fallback.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/comment-counts.ts
The twenty-fifth-round change made the layout set --content-top to
calc(3rem + <nav>px). Untyped custom properties compute to their raw
token stream, so the scroll code's parseFloat(getComputedStyle(...))
became NaN — Virtuoso silently rejects a NaN scrollToIndex offset,
killing j/k, v-advance, file-tree click-to-scroll, and line deep links
on the Files tab and chapter pages (the continuous-mode readers guard
with isFinite and only lost their sticky offset). Registering the
property as a typed <length> makes it compute to resolved pixels, fixing
every reader while keeping the text-size scaling.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The single-key curated theme value now just resets to defaults on
upgrade instead of seeding the per-app-theme keys.
Comments recording where code was vendored from (hosted file paths, PR
numbers, "matches hosted" equivalences) are review-time noise now that
the port is done. Rationales that referenced hosted are reworded to
state the constraint on their own; the only remaining "hosted" mentions
describe GitHub-hosted URLs and self-hosted git remotes.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit acfe195. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold. Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 72 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/use-diff-settings.tsx
The continuous panel now renders the shared ChapterNavigator — icon
viewed-toggle on the left, prev/next steppers, the chapter dropdown
selector, and the actions menu — instead of its bespoke ordinal header,
and drops its bg-card tint. The navigator takes an optional in-page
navigation override because the continuous reader navigates by
scrolling its stream: a /chapters/N link there would remount the whole
reader through the normalizing redirect.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f37e90. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with unresolved findings still open, and this PR exceeds the medium approval threshold. Human review is needed; a reviewer is already assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@dastratakos
dastratakos merged commit e8f485f into mainAug 11, 2026
8 checks passed
@dastratakos
dastratakos deleted the dastratakos/vendor-hosted-stage-into-cli branch August 11, 2026 23:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dastratakos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability - #75

Merged
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli
Aug 11, 2026
Merged

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability#75
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli

Conversation

@dastratakos

@dastratakosdastratakos commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The hosted product (ReviewStage/stage) is sunsetted; this PR vendors its unported functionality into the CLI so users can continue on stagereview. Everything is ported as closely as possible to the hosted implementation (code, prompts, constants, and tests copied verbatim where the architectures align), based on a six-dimension gap analysis of the two repos' code and git histories.

Changes

Chapter generation — prompts (skills/stage-chapters/SKILL.md)

  • Full risk-classification rubric with riskLevel/riskReasons outputs (hosted #896)
  • Prologue rootCause section (hosted #1051), chapter-level mermaid diagram guidance (hosted #771)
  • Restored hosted's full exemplar density, PR title/body + additional-instructions context, keyChange inline-markdown rule

Chapter generation — pipeline & data model (packages/cli, packages/types)

  • No-newline markers filtered from parsed hunks (hosted #1132) with regression tests
  • Hosted ignore semantics: full DEFAULT_IGNORE_PATTERNS (7 new lockfiles, #871), one case-insensitive matcher so .stageignore! negations re-include defaults
  • Zero-hunk files (pure renames) included in Other Changes via the header-only sentinel
  • riskLevel/riskReasons + rootCause across types, DB (+migration), ingestion, routes
  • What-to-Review ordering by file order then start line (#865/#970); dense 0-based chapterIndex
  • prep: PULL REQUEST (title/body, 4k cap), STATS, and ADDITIONAL INSTRUCTIONS sections (.stageinstructions file + --instructions flag, hosted #1036 analog)
  • Repair-not-reject line refs; pre-assembled chapter files no longer bypass validation; literal-\n unescaping; consistent diff prefixes

Review UI (packages/web)

  • Activity tab: conversation timeline (gh-api-backed), review cards, review-comment diff previews (#1105), events column, read-only reactions
  • Continuous chapter review mode (Page/Scroll, #1083) with active-chapter preservation on mode switch
  • Risk badges, per-chapter/per-file comment counts, remaining-review-lines sticky header (#1107)
  • Markdown stack: shiki highlighting (#796/#826), mermaid in chapter summaries (#771), GitHub image proxy for private attachments (#820)
  • Diff extras: image diffs (base64 over the wire), full previews for moved files (#1106), virtualized file list, minimize inline comments
  • Small fixes: bot reviewer badges (#1131), resolve-button placement (#1133), sticky-header z-index (#1019), CI popover scroll (#1061), min-height floor (#1014), annotation tinting (#757/#1016), index j/k (#835), dark default theme (#819), derived chapter viewed state (#1021)
  • GitHub: stale pending-review recovery (#1072), label management (#1071)
  • GitHub viewed-file sync: marks/unmarks files on GitHub per hosted's rules and unions GitHub's viewed state into the local view state (PR runs, best-effort)
  • Merge: ruleset-aware allowed merge methods (#1057), single inline merge action with status chip and queue position (#1052)
  • Stacked-PR detection and navigation with ⌘⇧↑/⌘⇧↓ (#1049); entries with a local run navigate to it, others link to GitHub
  • Review panel keyboard shortcuts: ⌘J toggle, ⌘↩ submit

Configurability

  • Diff typography (font/size/line height/ligatures, #974), per-app-theme syntax themes (62), app text size (#1038), chapter panel position (#898), What-to-Review visibility (#1077)

Descoped (depend on hosted backends): Stagent chat, ⌘K action board, reaction toggling, timeline-side comment mutations, mobile layouts, AI chapter editing/regeneration UI.

Testing

  • pnpm typecheck, pnpm lint, pnpm test all green (73 files, 643 tests — including regression suites ported from hosted for the diff parser, file filtering, other-changes, line-ref repair, remaining-line counts, timeline assembly, full-file previews, and review recovery)
  • pnpm build (SPA + CLI bundle) succeeds

Open workspace in Conductor


Summary by cubic

Vendors the hosted Stage experience into the CLI so teams can keep using stagereview after the hosted app sunset, with generation parity, a full review UI, GitHub viewed-file sync, labels/stack/merge parity, and configurable display/settings. Also aligns the continuous chapter panel header with paged mode by reusing the shared chapter navigator, with in-page navigation to avoid remounts.

  • Bug Fixes

    • Drop stale comment‑draft store writes that settle after stack navigation.
    • Count outdated GitHub review threads via their original coordinates and carry them as a null‑anchored variant so file and chapter comment badges stay accurate.
    • Restore j/k navigation and scroll‑into‑view by typing the --content-top CSS variable, fixing keyboard and deep‑link scrolling in Files and chapter pages.
  • Refactors

    • Drop the legacy syntax‑theme localStorage migration; the curated single‑key setting now resets to defaults on upgrade. Remove hosted‑Stage provenance comments (no behavior change).

Written for commit 0f37e90. Summary will update on new commits.

Review in cubic

Port the hosted narrative/summary agent prompt content verbatim: full risk
classification rubric with riskLevel/riskReasons output fields, prologue
rootCause section, chapter-level mermaid diagram guidance, restored exemplar
density for motivation/outcome/keyChanges/focusAreas/complexity, keyChange
inline-markdown rule, and PR title/body + additional-instructions context
consumption. Fix stale hunks.txt/commits.txt references.
…e CLI
- Filter no-newline markers out of parsed hunk lines (hosted #1132) with
regression tests
- Vendor hosted DEFAULT_IGNORE_PATTERNS (adds 7 missing lockfiles, #871) and
hosted ignore semantics: one case-insensitive matcher so .stageignore
negations can re-include default-ignored files
- Include zero-hunk files (pure renames/moves) in the Other Changes chapter
via the HEADER_ONLY_OLD_START sentinel
- Add riskLevel/riskReasons to chapters (hosted #896) and rootCause to the
prologue (hosted #1051) across types, DB schema (+migration), ingestion,
persistence, and routes
- Order What to Review items by chapter file order, then start line
(hosted #865/#970)
- prep: add PULL REQUEST (title/body, 4k truncation), STATS, and ADDITIONAL
INSTRUCTIONS sections; instructions come from .stageinstructions and a new
--instructions flag (hosted #1036 analog)
- Repair-not-reject line refs like hosted: drop the startLine<=endLine refine
and lineRefs.min(1); sanitize instead, and stop bypassing validation for
pre-assembled chapter files
- Unescape literal \n sequences in summaries/key changes (hosted #772)
- Assign dense 0-based chapterIndex like hosted persist
- Force diff prefixes in view-time git diff args
- Add /api/image-proxy route for GitHub comment attachments (hosted #820)
- Shiki CodeBlock + highlighter singleton for fenced code blocks in all
markdown (hosted #796/#826)
- Render fenced mermaid blocks through the shared MermaidDiagram so chapter
summaries get diagrams (hosted #771)
- Rewrite GitHub attachment image URLs through /api/image-proxy so private
images load (hosted #820)
- Show review status badges for bot reviewers (hosted #1131)
- Move inline comment resolve button next to reply (hosted #1133)
- Keep sticky overview header above scrolling lists (hosted #1019)
- Scroll CI checks popover when the expanded list overflows (hosted #1061)
- Anchor the content column to the viewport min-height (hosted #1014)
- Tint inline comment annotation rows by diff line type (hosted #757/#1016)
- Wire j/k chapter navigation on the overview page (hosted #835)
- Default to dark theme, including the pre-hydration script (hosted #819)
- Derive chapter viewed state from file views (hosted #1021)
- Display chapters as order + 1 now that the wire order is the dense
0-based chapter index (hosted parity)
- Diff typography: font family presets, size, line height, ligatures
(hosted #974), with webfont loading in index.html
- Full syntax theme set with independent light/dark selection per app
theme, migrating the legacy single-key setting (hosted #974)
- App text size preference with pre-render application (hosted #1038)
- What to Review visibility consumption in chapter summaries (hosted #1077)
- Minimize inline comments setting, indicator component, and 'i' shortcut
- Chapter view (Page/Scroll) settings row
…header
- RiskBadge/RiskChip with riskReasons tooltip on the index list and
chapter panel (hosted #896/#1012)
- Chapter title block and actions menu with panel position and What to
Review controls (hosted #1012/#898/#1077)
- Left/top/right chapter panel positions (hosted #898)
- Real per-chapter and per-file comment counts from review threads,
replacing NO_COMMENT_COUNTS stubs
- Remaining review lines in the sticky header with total tooltip
(hosted #1107), with ported hosted tests
- Unmarking a chapter also clears its file views on the detail page
- Detect GITHUB_REVIEW_NOT_PENDING on review submit and recover
server-side: retry, dedupe an already-submitted decision, or open a
fresh review (hosted #1072), with ported test scenarios
- GitHub label display and add/remove management in the PR header with
luminance-based chip colors, gated on write access (hosted #1071),
backed by new /api label routes with CSRF guard and tests
- Minimize inline comments: collapsed annotation rows render the indicator
chip, 'i' toggles, composer forces rows open (hosted #1016 + minimize flow)
- Diff typography CSS variables feed Pierre from the new settings
- Per-app-theme syntax themes passed straight to Pierre (hosted parity)
- Image diff viewer with side-by-side layouts (hosted); the diff route now
ships base64 contents for binary images and rename-header contents for
pure renames so images and moved-file previews render locally
- Full-content previews for moved/renamed files (hosted #1106) with tests
- Virtualized file list via react-virtuoso with hosted's tuning; collapse
keeps rendered DOM and compensates sticky-header scroll
Port the Scroll chapter view (hosted #1083): one virtualized stream of all
chapter diffs with sticky per-chapter narrative panels, scroll-driven
active-chapter tracking, completion auto-advance, key-change focus, and
deep-link normalization between paged and continuous modes. Switching back
to Page mode lands on the chapter that was active in the stream via the
vendored ChapterViewState context.
- GitHub timeline assembly (issue comments, reviews with grouped comments
and resolved threads, commits/label/assign/merge events, reactions) via
gh api, ported from hosted's conversation module, with route + tests
- Conversation components: discussion timeline with hide-resolved and
hide-bots switches, review cards with sticky file headers (post-#1139),
review comment diff previews honoring diff settings (hosted #1105),
events/commits column, read-only reaction bars, loading skeleton
- Activity tab in the run layout, gated to PR runs, with comment count
- ChapterViewStateProvider mounted in the run layout
Descoped from hosted: reaction toggling and timeline-side comment
mutations (no local backend for those write paths).
Comment threadpackages/cli/src/routes/image-proxy.ts
Comment threadpackages/cli/src/runs/review.ts
@cursor
cursorBot requested a review from charleslpanAugust 10, 2026 04:38

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, Security Agent reported an unresolved high-severity issue, and this PR is above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:5d995b7d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/build-other-changes.ts
Comment threadpackages/cli/src/show.ts Outdated
Comment threadpackages/cli/src/github/timeline.ts
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/cli/src/routes/diff.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx Outdated
Comment threadpackages/web/src/routes/chapter-detail-page.tsx
Comment threadpackages/web/src/lib/use-timeline.ts

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 128 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/routes/continuous-chapters-page.tsx Outdated
Comment threadpackages/web/src/lib/full-file-preview.ts
Comment threadpackages/cli/src/github/review.ts Outdated
Comment threadpackages/web/src/lib/remaining-line-counts.ts Outdated
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx
Comment threadpackages/cli/src/__tests__/timeline-route-harness.ts Outdated
Comment threadpackages/web/src/components/chapter/risk-badge.tsx
Comment threadpackages/web/src/components/conversation/events-timeline.tsx
mod+j toggles the review tray and mod+enter submits when focus is inside
it, matching hosted's pending-review-panel bindings. Also registers the
stacked-PR navigation shortcuts for the upcoming stack nav.
- Respect base-branch ruleset merge methods: intersect repo-level flags
with PULL_REQUEST rule allowances and drop MERGE under required linear
history (hosted #1057), with all 10 hosted ruleset tests ported
- Replace the merge popover with a status chip and a single inline action
driven by getMergeAction — Merge/Auto-merge/Disable auto-merge/Leave
queue — gated on the per-PR viewerCanEnableAutoMerge flag (hosted #1052),
with the 14 decision-function tests and the xs button variant
- Show merge queue position in the status pill (hosted #1052)
Derive PR stacks on read from open base->head branch chains (hosted #1049,
algorithm and 12-case test suite ported verbatim) and show hosted's stack
navigator in the PR header. CLI adaptation: entries with a local run for
the same repo and PR number navigate to that run preserving the current
tab; entries without one open the PR on GitHub. mod+shift+up/down step
through the stack.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot skipped, an unresolved high-severity Security Agent finding remains, unresolved review threads are still open, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 21 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-action.ts
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/web/src/lib/utils/pull-request-status.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:570505304f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/routes/diff.ts Outdated
Comment threadpackages/web/src/lib/comment-counts.ts Outdated
Comment threadpackages/web/src/components/chapter/pierre-diff-viewer.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/cli/src/instructions.ts Outdated
Comment threadpackages/cli/src/github/pull-request-stack.ts Outdated
Comment threadpackages/web/src/routes/continuous-chapters-page.tsx
- Query and surface subjectType on pending comments so file-level
comments show hosted's File icon instead of being mislabeled Outdated
- Match hosted's panel: 520px popover, thin scrollbar on the pending
list, ShortcutTooltip trigger with the mod+j hint
- The list already included pending replies and renders through the same
compact layout as hosted's PendingCommentsList; the shared
CommentMarkdownEditor was already in place for the review body
@dastratakosdastratakos changed the title Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityfeat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityAug 10, 2026
Comment threadpackages/cli/src/show.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot completed as skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, and unresolved review threads remain above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

Pierre 1.1.20 isolates its pre element, flattening the diff into one paint
unit, so the light-DOM highlight boxes (z-2/z-3) painted over comment rows
(which Pierre pins at z-index 2). Release the isolation inside our already
isolated diff container and lift annotation rows to z-index 4 so comments
render above highlights while highlights stay visible over code lines.
The virtualized list pads the top of every item, but the page shell already
pads above the list, doubling the space before the first diff on the chapter
detail page and the Files tab. Skip the first item's padding to restore the
pre-virtuoso space-y-4 spacing. The continuous reader keeps hosted's
uniform padding — there the first file's gap separates it from the chapter
panel by design.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, unresolved review threads remain, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ba5b0d2. Configure here.

Comment threadpackages/cli/src/__tests__/pull-request.routes.test.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved high-severity finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ba5b0d2b1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/web/src/lib/use-reviewer-manager.ts
Comment threadpackages/cli/src/unescape.ts
Comment threadpackages/web/src/components/pull-request/pull-request-stack-nav.tsx Outdated
Comment threadpackages/cli/src/routes/view-state.ts
Comment threadpackages/web/src/routes/pull-request-layout.tsx Outdated

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b9b3e7. Configure here.

Comment threadpackages/cli/src/github/pull-request.ts Outdated

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/__tests__/view-state-github-harness.ts">
<violation number="1" location="packages/cli/src/__tests__/view-state-github-harness.ts:130">
P3: The shim hardcodes state OPEN on every pr list response, so the routes tests using this harness cannot exercise the closed/merged-PR fallback in getPullRequestOrThrow (pull-request.ts:196, listParsed.data.find(pr => pr.state === OPEN) ?? listParsed.data[0]). The available options (branchPrNumber or null) only cover the open-PR and no-PR cases, leaving the newest-closed-PR fallback and prefer-open ordering untested by the integration suite. Consider exposing a configurable pr-list entries option on the harness so that fallback gets regression coverage.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/cli/src/__tests__/view-state-github-harness.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The tray's pending list now reuses the Activity tab's ReviewThreadItem —
file header, diff-hunk line preview, thread header, and comment body —
instead of a bespoke card. The review query selects diffHunk, databaseId,
and original line coordinates so each pending draft maps onto the
Discussion panel's Thread shape; FILE and outdated drafts skip the
preview gracefully.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cd06993e8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/web/src/app/runs.$runId.tsx
Comment threadpackages/cli/src/github/review.ts
A comment submission that settles after the run switches must not close or
error a draft in the sibling run's store. Each write now carries the reset
generation its caller rendered with; the store drops writes from a
superseded generation.
Hosted's commentMatchesHunk falls back to original_line against the
old-file range for outdated comments (line nulled by GitHub); the CLI
dropped them from the wire entirely, so file and chapter badges lost
existing discussions the Activity tab still shows. Outdated line threads
now ride the wire as a null-anchored variant carrying their frozen
original coordinates — inline rendering already skips null anchors, and
the count builders apply hosted's fallback.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/comment-counts.ts
The twenty-fifth-round change made the layout set --content-top to
calc(3rem + <nav>px). Untyped custom properties compute to their raw
token stream, so the scroll code's parseFloat(getComputedStyle(...))
became NaN — Virtuoso silently rejects a NaN scrollToIndex offset,
killing j/k, v-advance, file-tree click-to-scroll, and line deep links
on the Files tab and chapter pages (the continuous-mode readers guard
with isFinite and only lost their sticky offset). Registering the
property as a typed <length> makes it compute to resolved pixels, fixing
every reader while keeping the text-size scaling.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The single-key curated theme value now just resets to defaults on
upgrade instead of seeding the per-app-theme keys.
Comments recording where code was vendored from (hosted file paths, PR
numbers, "matches hosted" equivalences) are review-time noise now that
the port is done. Rationales that referenced hosted are reworded to
state the constraint on their own; the only remaining "hosted" mentions
describe GitHub-hosted URLs and self-hosted git remotes.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit acfe195. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold. Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 72 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/use-diff-settings.tsx
The continuous panel now renders the shared ChapterNavigator — icon
viewed-toggle on the left, prev/next steppers, the chapter dropdown
selector, and the actions menu — instead of its bespoke ordinal header,
and drops its bg-card tint. The navigator takes an optional in-page
navigation override because the continuous reader navigates by
scrolling its stream: a /chapters/N link there would remount the whole
reader through the normalizing redirect.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f37e90. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with unresolved findings still open, and this PR exceeds the medium approval threshold. Human review is needed; a reviewer is already assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@dastratakos
dastratakos merged commit e8f485f into mainAug 11, 2026
8 checks passed
@dastratakos
dastratakos deleted the dastratakos/vendor-hosted-stage-into-cli branch August 11, 2026 23:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dastratakos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability - #75

Merged
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli
Aug 11, 2026
Merged

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability#75
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli

Conversation

@dastratakos

@dastratakosdastratakos commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The hosted product (ReviewStage/stage) is sunsetted; this PR vendors its unported functionality into the CLI so users can continue on stagereview. Everything is ported as closely as possible to the hosted implementation (code, prompts, constants, and tests copied verbatim where the architectures align), based on a six-dimension gap analysis of the two repos' code and git histories.

Changes

Chapter generation — prompts (skills/stage-chapters/SKILL.md)

  • Full risk-classification rubric with riskLevel/riskReasons outputs (hosted #896)
  • Prologue rootCause section (hosted #1051), chapter-level mermaid diagram guidance (hosted #771)
  • Restored hosted's full exemplar density, PR title/body + additional-instructions context, keyChange inline-markdown rule

Chapter generation — pipeline & data model (packages/cli, packages/types)

  • No-newline markers filtered from parsed hunks (hosted #1132) with regression tests
  • Hosted ignore semantics: full DEFAULT_IGNORE_PATTERNS (7 new lockfiles, #871), one case-insensitive matcher so .stageignore! negations re-include defaults
  • Zero-hunk files (pure renames) included in Other Changes via the header-only sentinel
  • riskLevel/riskReasons + rootCause across types, DB (+migration), ingestion, routes
  • What-to-Review ordering by file order then start line (#865/#970); dense 0-based chapterIndex
  • prep: PULL REQUEST (title/body, 4k cap), STATS, and ADDITIONAL INSTRUCTIONS sections (.stageinstructions file + --instructions flag, hosted #1036 analog)
  • Repair-not-reject line refs; pre-assembled chapter files no longer bypass validation; literal-\n unescaping; consistent diff prefixes

Review UI (packages/web)

  • Activity tab: conversation timeline (gh-api-backed), review cards, review-comment diff previews (#1105), events column, read-only reactions
  • Continuous chapter review mode (Page/Scroll, #1083) with active-chapter preservation on mode switch
  • Risk badges, per-chapter/per-file comment counts, remaining-review-lines sticky header (#1107)
  • Markdown stack: shiki highlighting (#796/#826), mermaid in chapter summaries (#771), GitHub image proxy for private attachments (#820)
  • Diff extras: image diffs (base64 over the wire), full previews for moved files (#1106), virtualized file list, minimize inline comments
  • Small fixes: bot reviewer badges (#1131), resolve-button placement (#1133), sticky-header z-index (#1019), CI popover scroll (#1061), min-height floor (#1014), annotation tinting (#757/#1016), index j/k (#835), dark default theme (#819), derived chapter viewed state (#1021)
  • GitHub: stale pending-review recovery (#1072), label management (#1071)
  • GitHub viewed-file sync: marks/unmarks files on GitHub per hosted's rules and unions GitHub's viewed state into the local view state (PR runs, best-effort)
  • Merge: ruleset-aware allowed merge methods (#1057), single inline merge action with status chip and queue position (#1052)
  • Stacked-PR detection and navigation with ⌘⇧↑/⌘⇧↓ (#1049); entries with a local run navigate to it, others link to GitHub
  • Review panel keyboard shortcuts: ⌘J toggle, ⌘↩ submit

Configurability

  • Diff typography (font/size/line height/ligatures, #974), per-app-theme syntax themes (62), app text size (#1038), chapter panel position (#898), What-to-Review visibility (#1077)

Descoped (depend on hosted backends): Stagent chat, ⌘K action board, reaction toggling, timeline-side comment mutations, mobile layouts, AI chapter editing/regeneration UI.

Testing

  • pnpm typecheck, pnpm lint, pnpm test all green (73 files, 643 tests — including regression suites ported from hosted for the diff parser, file filtering, other-changes, line-ref repair, remaining-line counts, timeline assembly, full-file previews, and review recovery)
  • pnpm build (SPA + CLI bundle) succeeds

Open workspace in Conductor


Summary by cubic

Vendors the hosted Stage experience into the CLI so teams can keep using stagereview after the hosted app sunset, with generation parity, a full review UI, GitHub viewed-file sync, labels/stack/merge parity, and configurable display/settings. Also aligns the continuous chapter panel header with paged mode by reusing the shared chapter navigator, with in-page navigation to avoid remounts.

  • Bug Fixes

    • Drop stale comment‑draft store writes that settle after stack navigation.
    • Count outdated GitHub review threads via their original coordinates and carry them as a null‑anchored variant so file and chapter comment badges stay accurate.
    • Restore j/k navigation and scroll‑into‑view by typing the --content-top CSS variable, fixing keyboard and deep‑link scrolling in Files and chapter pages.
  • Refactors

    • Drop the legacy syntax‑theme localStorage migration; the curated single‑key setting now resets to defaults on upgrade. Remove hosted‑Stage provenance comments (no behavior change).

Written for commit 0f37e90. Summary will update on new commits.

Review in cubic

Port the hosted narrative/summary agent prompt content verbatim: full risk
classification rubric with riskLevel/riskReasons output fields, prologue
rootCause section, chapter-level mermaid diagram guidance, restored exemplar
density for motivation/outcome/keyChanges/focusAreas/complexity, keyChange
inline-markdown rule, and PR title/body + additional-instructions context
consumption. Fix stale hunks.txt/commits.txt references.
…e CLI
- Filter no-newline markers out of parsed hunk lines (hosted #1132) with
regression tests
- Vendor hosted DEFAULT_IGNORE_PATTERNS (adds 7 missing lockfiles, #871) and
hosted ignore semantics: one case-insensitive matcher so .stageignore
negations can re-include default-ignored files
- Include zero-hunk files (pure renames/moves) in the Other Changes chapter
via the HEADER_ONLY_OLD_START sentinel
- Add riskLevel/riskReasons to chapters (hosted #896) and rootCause to the
prologue (hosted #1051) across types, DB schema (+migration), ingestion,
persistence, and routes
- Order What to Review items by chapter file order, then start line
(hosted #865/#970)
- prep: add PULL REQUEST (title/body, 4k truncation), STATS, and ADDITIONAL
INSTRUCTIONS sections; instructions come from .stageinstructions and a new
--instructions flag (hosted #1036 analog)
- Repair-not-reject line refs like hosted: drop the startLine<=endLine refine
and lineRefs.min(1); sanitize instead, and stop bypassing validation for
pre-assembled chapter files
- Unescape literal \n sequences in summaries/key changes (hosted #772)
- Assign dense 0-based chapterIndex like hosted persist
- Force diff prefixes in view-time git diff args
- Add /api/image-proxy route for GitHub comment attachments (hosted #820)
- Shiki CodeBlock + highlighter singleton for fenced code blocks in all
markdown (hosted #796/#826)
- Render fenced mermaid blocks through the shared MermaidDiagram so chapter
summaries get diagrams (hosted #771)
- Rewrite GitHub attachment image URLs through /api/image-proxy so private
images load (hosted #820)
- Show review status badges for bot reviewers (hosted #1131)
- Move inline comment resolve button next to reply (hosted #1133)
- Keep sticky overview header above scrolling lists (hosted #1019)
- Scroll CI checks popover when the expanded list overflows (hosted #1061)
- Anchor the content column to the viewport min-height (hosted #1014)
- Tint inline comment annotation rows by diff line type (hosted #757/#1016)
- Wire j/k chapter navigation on the overview page (hosted #835)
- Default to dark theme, including the pre-hydration script (hosted #819)
- Derive chapter viewed state from file views (hosted #1021)
- Display chapters as order + 1 now that the wire order is the dense
0-based chapter index (hosted parity)
- Diff typography: font family presets, size, line height, ligatures
(hosted #974), with webfont loading in index.html
- Full syntax theme set with independent light/dark selection per app
theme, migrating the legacy single-key setting (hosted #974)
- App text size preference with pre-render application (hosted #1038)
- What to Review visibility consumption in chapter summaries (hosted #1077)
- Minimize inline comments setting, indicator component, and 'i' shortcut
- Chapter view (Page/Scroll) settings row
…header
- RiskBadge/RiskChip with riskReasons tooltip on the index list and
chapter panel (hosted #896/#1012)
- Chapter title block and actions menu with panel position and What to
Review controls (hosted #1012/#898/#1077)
- Left/top/right chapter panel positions (hosted #898)
- Real per-chapter and per-file comment counts from review threads,
replacing NO_COMMENT_COUNTS stubs
- Remaining review lines in the sticky header with total tooltip
(hosted #1107), with ported hosted tests
- Unmarking a chapter also clears its file views on the detail page
- Detect GITHUB_REVIEW_NOT_PENDING on review submit and recover
server-side: retry, dedupe an already-submitted decision, or open a
fresh review (hosted #1072), with ported test scenarios
- GitHub label display and add/remove management in the PR header with
luminance-based chip colors, gated on write access (hosted #1071),
backed by new /api label routes with CSRF guard and tests
- Minimize inline comments: collapsed annotation rows render the indicator
chip, 'i' toggles, composer forces rows open (hosted #1016 + minimize flow)
- Diff typography CSS variables feed Pierre from the new settings
- Per-app-theme syntax themes passed straight to Pierre (hosted parity)
- Image diff viewer with side-by-side layouts (hosted); the diff route now
ships base64 contents for binary images and rename-header contents for
pure renames so images and moved-file previews render locally
- Full-content previews for moved/renamed files (hosted #1106) with tests
- Virtualized file list via react-virtuoso with hosted's tuning; collapse
keeps rendered DOM and compensates sticky-header scroll
Port the Scroll chapter view (hosted #1083): one virtualized stream of all
chapter diffs with sticky per-chapter narrative panels, scroll-driven
active-chapter tracking, completion auto-advance, key-change focus, and
deep-link normalization between paged and continuous modes. Switching back
to Page mode lands on the chapter that was active in the stream via the
vendored ChapterViewState context.
- GitHub timeline assembly (issue comments, reviews with grouped comments
and resolved threads, commits/label/assign/merge events, reactions) via
gh api, ported from hosted's conversation module, with route + tests
- Conversation components: discussion timeline with hide-resolved and
hide-bots switches, review cards with sticky file headers (post-#1139),
review comment diff previews honoring diff settings (hosted #1105),
events/commits column, read-only reaction bars, loading skeleton
- Activity tab in the run layout, gated to PR runs, with comment count
- ChapterViewStateProvider mounted in the run layout
Descoped from hosted: reaction toggling and timeline-side comment
mutations (no local backend for those write paths).
Comment threadpackages/cli/src/routes/image-proxy.ts
Comment threadpackages/cli/src/runs/review.ts
@cursor
cursorBot requested a review from charleslpanAugust 10, 2026 04:38

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, Security Agent reported an unresolved high-severity issue, and this PR is above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:5d995b7d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/build-other-changes.ts
Comment threadpackages/cli/src/show.ts Outdated
Comment threadpackages/cli/src/github/timeline.ts
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/cli/src/routes/diff.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx Outdated
Comment threadpackages/web/src/routes/chapter-detail-page.tsx
Comment threadpackages/web/src/lib/use-timeline.ts

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 128 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/routes/continuous-chapters-page.tsx Outdated
Comment threadpackages/web/src/lib/full-file-preview.ts
Comment threadpackages/cli/src/github/review.ts Outdated
Comment threadpackages/web/src/lib/remaining-line-counts.ts Outdated
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx
Comment threadpackages/cli/src/__tests__/timeline-route-harness.ts Outdated
Comment threadpackages/web/src/components/chapter/risk-badge.tsx
Comment threadpackages/web/src/components/conversation/events-timeline.tsx
mod+j toggles the review tray and mod+enter submits when focus is inside
it, matching hosted's pending-review-panel bindings. Also registers the
stacked-PR navigation shortcuts for the upcoming stack nav.
- Respect base-branch ruleset merge methods: intersect repo-level flags
with PULL_REQUEST rule allowances and drop MERGE under required linear
history (hosted #1057), with all 10 hosted ruleset tests ported
- Replace the merge popover with a status chip and a single inline action
driven by getMergeAction — Merge/Auto-merge/Disable auto-merge/Leave
queue — gated on the per-PR viewerCanEnableAutoMerge flag (hosted #1052),
with the 14 decision-function tests and the xs button variant
- Show merge queue position in the status pill (hosted #1052)
Derive PR stacks on read from open base->head branch chains (hosted #1049,
algorithm and 12-case test suite ported verbatim) and show hosted's stack
navigator in the PR header. CLI adaptation: entries with a local run for
the same repo and PR number navigate to that run preserving the current
tab; entries without one open the PR on GitHub. mod+shift+up/down step
through the stack.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot skipped, an unresolved high-severity Security Agent finding remains, unresolved review threads are still open, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 21 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-action.ts
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/web/src/lib/utils/pull-request-status.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:570505304f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/routes/diff.ts Outdated
Comment threadpackages/web/src/lib/comment-counts.ts Outdated
Comment threadpackages/web/src/components/chapter/pierre-diff-viewer.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/cli/src/instructions.ts Outdated
Comment threadpackages/cli/src/github/pull-request-stack.ts Outdated
Comment threadpackages/web/src/routes/continuous-chapters-page.tsx
- Query and surface subjectType on pending comments so file-level
comments show hosted's File icon instead of being mislabeled Outdated
- Match hosted's panel: 520px popover, thin scrollbar on the pending
list, ShortcutTooltip trigger with the mod+j hint
- The list already included pending replies and renders through the same
compact layout as hosted's PendingCommentsList; the shared
CommentMarkdownEditor was already in place for the review body
@dastratakosdastratakos changed the title Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityfeat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityAug 10, 2026
Comment threadpackages/cli/src/show.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot completed as skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, and unresolved review threads remain above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

Pierre 1.1.20 isolates its pre element, flattening the diff into one paint
unit, so the light-DOM highlight boxes (z-2/z-3) painted over comment rows
(which Pierre pins at z-index 2). Release the isolation inside our already
isolated diff container and lift annotation rows to z-index 4 so comments
render above highlights while highlights stay visible over code lines.
The virtualized list pads the top of every item, but the page shell already
pads above the list, doubling the space before the first diff on the chapter
detail page and the Files tab. Skip the first item's padding to restore the
pre-virtuoso space-y-4 spacing. The continuous reader keeps hosted's
uniform padding — there the first file's gap separates it from the chapter
panel by design.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, unresolved review threads remain, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ba5b0d2. Configure here.

Comment threadpackages/cli/src/__tests__/pull-request.routes.test.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved high-severity finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ba5b0d2b1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/web/src/lib/use-reviewer-manager.ts
Comment threadpackages/cli/src/unescape.ts
Comment threadpackages/web/src/components/pull-request/pull-request-stack-nav.tsx Outdated
Comment threadpackages/cli/src/routes/view-state.ts
Comment threadpackages/web/src/routes/pull-request-layout.tsx Outdated

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b9b3e7. Configure here.

Comment threadpackages/cli/src/github/pull-request.ts Outdated

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/__tests__/view-state-github-harness.ts">
<violation number="1" location="packages/cli/src/__tests__/view-state-github-harness.ts:130">
P3: The shim hardcodes state OPEN on every pr list response, so the routes tests using this harness cannot exercise the closed/merged-PR fallback in getPullRequestOrThrow (pull-request.ts:196, listParsed.data.find(pr => pr.state === OPEN) ?? listParsed.data[0]). The available options (branchPrNumber or null) only cover the open-PR and no-PR cases, leaving the newest-closed-PR fallback and prefer-open ordering untested by the integration suite. Consider exposing a configurable pr-list entries option on the harness so that fallback gets regression coverage.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/cli/src/__tests__/view-state-github-harness.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The tray's pending list now reuses the Activity tab's ReviewThreadItem —
file header, diff-hunk line preview, thread header, and comment body —
instead of a bespoke card. The review query selects diffHunk, databaseId,
and original line coordinates so each pending draft maps onto the
Discussion panel's Thread shape; FILE and outdated drafts skip the
preview gracefully.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cd06993e8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/web/src/app/runs.$runId.tsx
Comment threadpackages/cli/src/github/review.ts
A comment submission that settles after the run switches must not close or
error a draft in the sibling run's store. Each write now carries the reset
generation its caller rendered with; the store drops writes from a
superseded generation.
Hosted's commentMatchesHunk falls back to original_line against the
old-file range for outdated comments (line nulled by GitHub); the CLI
dropped them from the wire entirely, so file and chapter badges lost
existing discussions the Activity tab still shows. Outdated line threads
now ride the wire as a null-anchored variant carrying their frozen
original coordinates — inline rendering already skips null anchors, and
the count builders apply hosted's fallback.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/comment-counts.ts
The twenty-fifth-round change made the layout set --content-top to
calc(3rem + <nav>px). Untyped custom properties compute to their raw
token stream, so the scroll code's parseFloat(getComputedStyle(...))
became NaN — Virtuoso silently rejects a NaN scrollToIndex offset,
killing j/k, v-advance, file-tree click-to-scroll, and line deep links
on the Files tab and chapter pages (the continuous-mode readers guard
with isFinite and only lost their sticky offset). Registering the
property as a typed <length> makes it compute to resolved pixels, fixing
every reader while keeping the text-size scaling.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The single-key curated theme value now just resets to defaults on
upgrade instead of seeding the per-app-theme keys.
Comments recording where code was vendored from (hosted file paths, PR
numbers, "matches hosted" equivalences) are review-time noise now that
the port is done. Rationales that referenced hosted are reworded to
state the constraint on their own; the only remaining "hosted" mentions
describe GitHub-hosted URLs and self-hosted git remotes.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit acfe195. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold. Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 72 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/use-diff-settings.tsx
The continuous panel now renders the shared ChapterNavigator — icon
viewed-toggle on the left, prev/next steppers, the chapter dropdown
selector, and the actions menu — instead of its bespoke ordinal header,
and drops its bg-card tint. The navigator takes an optional in-page
navigation override because the continuous reader navigates by
scrolling its stream: a /chapters/N link there would remount the whole
reader through the normalizing redirect.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f37e90. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with unresolved findings still open, and this PR exceeds the medium approval threshold. Human review is needed; a reviewer is already assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@dastratakos
dastratakos merged commit e8f485f into mainAug 11, 2026
8 checks passed
@dastratakos
dastratakos deleted the dastratakos/vendor-hosted-stage-into-cli branch August 11, 2026 23:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dastratakos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability - #75

Merged
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli
Aug 11, 2026
Merged

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability#75
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli

Conversation

@dastratakos

@dastratakosdastratakos commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The hosted product (ReviewStage/stage) is sunsetted; this PR vendors its unported functionality into the CLI so users can continue on stagereview. Everything is ported as closely as possible to the hosted implementation (code, prompts, constants, and tests copied verbatim where the architectures align), based on a six-dimension gap analysis of the two repos' code and git histories.

Changes

Chapter generation — prompts (skills/stage-chapters/SKILL.md)

  • Full risk-classification rubric with riskLevel/riskReasons outputs (hosted #896)
  • Prologue rootCause section (hosted #1051), chapter-level mermaid diagram guidance (hosted #771)
  • Restored hosted's full exemplar density, PR title/body + additional-instructions context, keyChange inline-markdown rule

Chapter generation — pipeline & data model (packages/cli, packages/types)

  • No-newline markers filtered from parsed hunks (hosted #1132) with regression tests
  • Hosted ignore semantics: full DEFAULT_IGNORE_PATTERNS (7 new lockfiles, #871), one case-insensitive matcher so .stageignore! negations re-include defaults
  • Zero-hunk files (pure renames) included in Other Changes via the header-only sentinel
  • riskLevel/riskReasons + rootCause across types, DB (+migration), ingestion, routes
  • What-to-Review ordering by file order then start line (#865/#970); dense 0-based chapterIndex
  • prep: PULL REQUEST (title/body, 4k cap), STATS, and ADDITIONAL INSTRUCTIONS sections (.stageinstructions file + --instructions flag, hosted #1036 analog)
  • Repair-not-reject line refs; pre-assembled chapter files no longer bypass validation; literal-\n unescaping; consistent diff prefixes

Review UI (packages/web)

  • Activity tab: conversation timeline (gh-api-backed), review cards, review-comment diff previews (#1105), events column, read-only reactions
  • Continuous chapter review mode (Page/Scroll, #1083) with active-chapter preservation on mode switch
  • Risk badges, per-chapter/per-file comment counts, remaining-review-lines sticky header (#1107)
  • Markdown stack: shiki highlighting (#796/#826), mermaid in chapter summaries (#771), GitHub image proxy for private attachments (#820)
  • Diff extras: image diffs (base64 over the wire), full previews for moved files (#1106), virtualized file list, minimize inline comments
  • Small fixes: bot reviewer badges (#1131), resolve-button placement (#1133), sticky-header z-index (#1019), CI popover scroll (#1061), min-height floor (#1014), annotation tinting (#757/#1016), index j/k (#835), dark default theme (#819), derived chapter viewed state (#1021)
  • GitHub: stale pending-review recovery (#1072), label management (#1071)
  • GitHub viewed-file sync: marks/unmarks files on GitHub per hosted's rules and unions GitHub's viewed state into the local view state (PR runs, best-effort)
  • Merge: ruleset-aware allowed merge methods (#1057), single inline merge action with status chip and queue position (#1052)
  • Stacked-PR detection and navigation with ⌘⇧↑/⌘⇧↓ (#1049); entries with a local run navigate to it, others link to GitHub
  • Review panel keyboard shortcuts: ⌘J toggle, ⌘↩ submit

Configurability

  • Diff typography (font/size/line height/ligatures, #974), per-app-theme syntax themes (62), app text size (#1038), chapter panel position (#898), What-to-Review visibility (#1077)

Descoped (depend on hosted backends): Stagent chat, ⌘K action board, reaction toggling, timeline-side comment mutations, mobile layouts, AI chapter editing/regeneration UI.

Testing

  • pnpm typecheck, pnpm lint, pnpm test all green (73 files, 643 tests — including regression suites ported from hosted for the diff parser, file filtering, other-changes, line-ref repair, remaining-line counts, timeline assembly, full-file previews, and review recovery)
  • pnpm build (SPA + CLI bundle) succeeds

Open workspace in Conductor


Summary by cubic

Vendors the hosted Stage experience into the CLI so teams can keep using stagereview after the hosted app sunset, with generation parity, a full review UI, GitHub viewed-file sync, labels/stack/merge parity, and configurable display/settings. Also aligns the continuous chapter panel header with paged mode by reusing the shared chapter navigator, with in-page navigation to avoid remounts.

  • Bug Fixes

    • Drop stale comment‑draft store writes that settle after stack navigation.
    • Count outdated GitHub review threads via their original coordinates and carry them as a null‑anchored variant so file and chapter comment badges stay accurate.
    • Restore j/k navigation and scroll‑into‑view by typing the --content-top CSS variable, fixing keyboard and deep‑link scrolling in Files and chapter pages.
  • Refactors

    • Drop the legacy syntax‑theme localStorage migration; the curated single‑key setting now resets to defaults on upgrade. Remove hosted‑Stage provenance comments (no behavior change).

Written for commit 0f37e90. Summary will update on new commits.

Review in cubic

Port the hosted narrative/summary agent prompt content verbatim: full risk
classification rubric with riskLevel/riskReasons output fields, prologue
rootCause section, chapter-level mermaid diagram guidance, restored exemplar
density for motivation/outcome/keyChanges/focusAreas/complexity, keyChange
inline-markdown rule, and PR title/body + additional-instructions context
consumption. Fix stale hunks.txt/commits.txt references.
…e CLI
- Filter no-newline markers out of parsed hunk lines (hosted #1132) with
regression tests
- Vendor hosted DEFAULT_IGNORE_PATTERNS (adds 7 missing lockfiles, #871) and
hosted ignore semantics: one case-insensitive matcher so .stageignore
negations can re-include default-ignored files
- Include zero-hunk files (pure renames/moves) in the Other Changes chapter
via the HEADER_ONLY_OLD_START sentinel
- Add riskLevel/riskReasons to chapters (hosted #896) and rootCause to the
prologue (hosted #1051) across types, DB schema (+migration), ingestion,
persistence, and routes
- Order What to Review items by chapter file order, then start line
(hosted #865/#970)
- prep: add PULL REQUEST (title/body, 4k truncation), STATS, and ADDITIONAL
INSTRUCTIONS sections; instructions come from .stageinstructions and a new
--instructions flag (hosted #1036 analog)
- Repair-not-reject line refs like hosted: drop the startLine<=endLine refine
and lineRefs.min(1); sanitize instead, and stop bypassing validation for
pre-assembled chapter files
- Unescape literal \n sequences in summaries/key changes (hosted #772)
- Assign dense 0-based chapterIndex like hosted persist
- Force diff prefixes in view-time git diff args
- Add /api/image-proxy route for GitHub comment attachments (hosted #820)
- Shiki CodeBlock + highlighter singleton for fenced code blocks in all
markdown (hosted #796/#826)
- Render fenced mermaid blocks through the shared MermaidDiagram so chapter
summaries get diagrams (hosted #771)
- Rewrite GitHub attachment image URLs through /api/image-proxy so private
images load (hosted #820)
- Show review status badges for bot reviewers (hosted #1131)
- Move inline comment resolve button next to reply (hosted #1133)
- Keep sticky overview header above scrolling lists (hosted #1019)
- Scroll CI checks popover when the expanded list overflows (hosted #1061)
- Anchor the content column to the viewport min-height (hosted #1014)
- Tint inline comment annotation rows by diff line type (hosted #757/#1016)
- Wire j/k chapter navigation on the overview page (hosted #835)
- Default to dark theme, including the pre-hydration script (hosted #819)
- Derive chapter viewed state from file views (hosted #1021)
- Display chapters as order + 1 now that the wire order is the dense
0-based chapter index (hosted parity)
- Diff typography: font family presets, size, line height, ligatures
(hosted #974), with webfont loading in index.html
- Full syntax theme set with independent light/dark selection per app
theme, migrating the legacy single-key setting (hosted #974)
- App text size preference with pre-render application (hosted #1038)
- What to Review visibility consumption in chapter summaries (hosted #1077)
- Minimize inline comments setting, indicator component, and 'i' shortcut
- Chapter view (Page/Scroll) settings row
…header
- RiskBadge/RiskChip with riskReasons tooltip on the index list and
chapter panel (hosted #896/#1012)
- Chapter title block and actions menu with panel position and What to
Review controls (hosted #1012/#898/#1077)
- Left/top/right chapter panel positions (hosted #898)
- Real per-chapter and per-file comment counts from review threads,
replacing NO_COMMENT_COUNTS stubs
- Remaining review lines in the sticky header with total tooltip
(hosted #1107), with ported hosted tests
- Unmarking a chapter also clears its file views on the detail page
- Detect GITHUB_REVIEW_NOT_PENDING on review submit and recover
server-side: retry, dedupe an already-submitted decision, or open a
fresh review (hosted #1072), with ported test scenarios
- GitHub label display and add/remove management in the PR header with
luminance-based chip colors, gated on write access (hosted #1071),
backed by new /api label routes with CSRF guard and tests
- Minimize inline comments: collapsed annotation rows render the indicator
chip, 'i' toggles, composer forces rows open (hosted #1016 + minimize flow)
- Diff typography CSS variables feed Pierre from the new settings
- Per-app-theme syntax themes passed straight to Pierre (hosted parity)
- Image diff viewer with side-by-side layouts (hosted); the diff route now
ships base64 contents for binary images and rename-header contents for
pure renames so images and moved-file previews render locally
- Full-content previews for moved/renamed files (hosted #1106) with tests
- Virtualized file list via react-virtuoso with hosted's tuning; collapse
keeps rendered DOM and compensates sticky-header scroll
Port the Scroll chapter view (hosted #1083): one virtualized stream of all
chapter diffs with sticky per-chapter narrative panels, scroll-driven
active-chapter tracking, completion auto-advance, key-change focus, and
deep-link normalization between paged and continuous modes. Switching back
to Page mode lands on the chapter that was active in the stream via the
vendored ChapterViewState context.
- GitHub timeline assembly (issue comments, reviews with grouped comments
and resolved threads, commits/label/assign/merge events, reactions) via
gh api, ported from hosted's conversation module, with route + tests
- Conversation components: discussion timeline with hide-resolved and
hide-bots switches, review cards with sticky file headers (post-#1139),
review comment diff previews honoring diff settings (hosted #1105),
events/commits column, read-only reaction bars, loading skeleton
- Activity tab in the run layout, gated to PR runs, with comment count
- ChapterViewStateProvider mounted in the run layout
Descoped from hosted: reaction toggling and timeline-side comment
mutations (no local backend for those write paths).
Comment threadpackages/cli/src/routes/image-proxy.ts
Comment threadpackages/cli/src/runs/review.ts
@cursor
cursorBot requested a review from charleslpanAugust 10, 2026 04:38

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, Security Agent reported an unresolved high-severity issue, and this PR is above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:5d995b7d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/build-other-changes.ts
Comment threadpackages/cli/src/show.ts Outdated
Comment threadpackages/cli/src/github/timeline.ts
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/cli/src/routes/diff.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx Outdated
Comment threadpackages/web/src/routes/chapter-detail-page.tsx
Comment threadpackages/web/src/lib/use-timeline.ts

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 128 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/routes/continuous-chapters-page.tsx Outdated
Comment threadpackages/web/src/lib/full-file-preview.ts
Comment threadpackages/cli/src/github/review.ts Outdated
Comment threadpackages/web/src/lib/remaining-line-counts.ts Outdated
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx
Comment threadpackages/cli/src/__tests__/timeline-route-harness.ts Outdated
Comment threadpackages/web/src/components/chapter/risk-badge.tsx
Comment threadpackages/web/src/components/conversation/events-timeline.tsx
mod+j toggles the review tray and mod+enter submits when focus is inside
it, matching hosted's pending-review-panel bindings. Also registers the
stacked-PR navigation shortcuts for the upcoming stack nav.
- Respect base-branch ruleset merge methods: intersect repo-level flags
with PULL_REQUEST rule allowances and drop MERGE under required linear
history (hosted #1057), with all 10 hosted ruleset tests ported
- Replace the merge popover with a status chip and a single inline action
driven by getMergeAction — Merge/Auto-merge/Disable auto-merge/Leave
queue — gated on the per-PR viewerCanEnableAutoMerge flag (hosted #1052),
with the 14 decision-function tests and the xs button variant
- Show merge queue position in the status pill (hosted #1052)
Derive PR stacks on read from open base->head branch chains (hosted #1049,
algorithm and 12-case test suite ported verbatim) and show hosted's stack
navigator in the PR header. CLI adaptation: entries with a local run for
the same repo and PR number navigate to that run preserving the current
tab; entries without one open the PR on GitHub. mod+shift+up/down step
through the stack.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot skipped, an unresolved high-severity Security Agent finding remains, unresolved review threads are still open, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 21 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-action.ts
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/web/src/lib/utils/pull-request-status.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:570505304f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/routes/diff.ts Outdated
Comment threadpackages/web/src/lib/comment-counts.ts Outdated
Comment threadpackages/web/src/components/chapter/pierre-diff-viewer.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/cli/src/instructions.ts Outdated
Comment threadpackages/cli/src/github/pull-request-stack.ts Outdated
Comment threadpackages/web/src/routes/continuous-chapters-page.tsx
- Query and surface subjectType on pending comments so file-level
comments show hosted's File icon instead of being mislabeled Outdated
- Match hosted's panel: 520px popover, thin scrollbar on the pending
list, ShortcutTooltip trigger with the mod+j hint
- The list already included pending replies and renders through the same
compact layout as hosted's PendingCommentsList; the shared
CommentMarkdownEditor was already in place for the review body
@dastratakosdastratakos changed the title Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityfeat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityAug 10, 2026
Comment threadpackages/cli/src/show.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot completed as skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, and unresolved review threads remain above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

Pierre 1.1.20 isolates its pre element, flattening the diff into one paint
unit, so the light-DOM highlight boxes (z-2/z-3) painted over comment rows
(which Pierre pins at z-index 2). Release the isolation inside our already
isolated diff container and lift annotation rows to z-index 4 so comments
render above highlights while highlights stay visible over code lines.
The virtualized list pads the top of every item, but the page shell already
pads above the list, doubling the space before the first diff on the chapter
detail page and the Files tab. Skip the first item's padding to restore the
pre-virtuoso space-y-4 spacing. The continuous reader keeps hosted's
uniform padding — there the first file's gap separates it from the chapter
panel by design.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, unresolved review threads remain, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ba5b0d2. Configure here.

Comment threadpackages/cli/src/__tests__/pull-request.routes.test.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved high-severity finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ba5b0d2b1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/web/src/lib/use-reviewer-manager.ts
Comment threadpackages/cli/src/unescape.ts
Comment threadpackages/web/src/components/pull-request/pull-request-stack-nav.tsx Outdated
Comment threadpackages/cli/src/routes/view-state.ts
Comment threadpackages/web/src/routes/pull-request-layout.tsx Outdated

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b9b3e7. Configure here.

Comment threadpackages/cli/src/github/pull-request.ts Outdated

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/__tests__/view-state-github-harness.ts">
<violation number="1" location="packages/cli/src/__tests__/view-state-github-harness.ts:130">
P3: The shim hardcodes state OPEN on every pr list response, so the routes tests using this harness cannot exercise the closed/merged-PR fallback in getPullRequestOrThrow (pull-request.ts:196, listParsed.data.find(pr => pr.state === OPEN) ?? listParsed.data[0]). The available options (branchPrNumber or null) only cover the open-PR and no-PR cases, leaving the newest-closed-PR fallback and prefer-open ordering untested by the integration suite. Consider exposing a configurable pr-list entries option on the harness so that fallback gets regression coverage.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/cli/src/__tests__/view-state-github-harness.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The tray's pending list now reuses the Activity tab's ReviewThreadItem —
file header, diff-hunk line preview, thread header, and comment body —
instead of a bespoke card. The review query selects diffHunk, databaseId,
and original line coordinates so each pending draft maps onto the
Discussion panel's Thread shape; FILE and outdated drafts skip the
preview gracefully.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cd06993e8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/web/src/app/runs.$runId.tsx
Comment threadpackages/cli/src/github/review.ts
A comment submission that settles after the run switches must not close or
error a draft in the sibling run's store. Each write now carries the reset
generation its caller rendered with; the store drops writes from a
superseded generation.
Hosted's commentMatchesHunk falls back to original_line against the
old-file range for outdated comments (line nulled by GitHub); the CLI
dropped them from the wire entirely, so file and chapter badges lost
existing discussions the Activity tab still shows. Outdated line threads
now ride the wire as a null-anchored variant carrying their frozen
original coordinates — inline rendering already skips null anchors, and
the count builders apply hosted's fallback.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/comment-counts.ts
The twenty-fifth-round change made the layout set --content-top to
calc(3rem + <nav>px). Untyped custom properties compute to their raw
token stream, so the scroll code's parseFloat(getComputedStyle(...))
became NaN — Virtuoso silently rejects a NaN scrollToIndex offset,
killing j/k, v-advance, file-tree click-to-scroll, and line deep links
on the Files tab and chapter pages (the continuous-mode readers guard
with isFinite and only lost their sticky offset). Registering the
property as a typed <length> makes it compute to resolved pixels, fixing
every reader while keeping the text-size scaling.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The single-key curated theme value now just resets to defaults on
upgrade instead of seeding the per-app-theme keys.
Comments recording where code was vendored from (hosted file paths, PR
numbers, "matches hosted" equivalences) are review-time noise now that
the port is done. Rationales that referenced hosted are reworded to
state the constraint on their own; the only remaining "hosted" mentions
describe GitHub-hosted URLs and self-hosted git remotes.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit acfe195. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold. Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 72 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/use-diff-settings.tsx
The continuous panel now renders the shared ChapterNavigator — icon
viewed-toggle on the left, prev/next steppers, the chapter dropdown
selector, and the actions menu — instead of its bespoke ordinal header,
and drops its bg-card tint. The navigator takes an optional in-page
navigation override because the continuous reader navigates by
scrolling its stream: a /chapters/N link there would remount the whole
reader through the normalizing redirect.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f37e90. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with unresolved findings still open, and this PR exceeds the medium approval threshold. Human review is needed; a reviewer is already assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@dastratakos
dastratakos merged commit e8f485f into mainAug 11, 2026
8 checks passed
@dastratakos
dastratakos deleted the dastratakos/vendor-hosted-stage-into-cli branch August 11, 2026 23:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dastratakos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability - #75

Merged
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli
Aug 11, 2026
Merged

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability#75
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli

Conversation

@dastratakos

@dastratakosdastratakos commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The hosted product (ReviewStage/stage) is sunsetted; this PR vendors its unported functionality into the CLI so users can continue on stagereview. Everything is ported as closely as possible to the hosted implementation (code, prompts, constants, and tests copied verbatim where the architectures align), based on a six-dimension gap analysis of the two repos' code and git histories.

Changes

Chapter generation — prompts (skills/stage-chapters/SKILL.md)

  • Full risk-classification rubric with riskLevel/riskReasons outputs (hosted #896)
  • Prologue rootCause section (hosted #1051), chapter-level mermaid diagram guidance (hosted #771)
  • Restored hosted's full exemplar density, PR title/body + additional-instructions context, keyChange inline-markdown rule

Chapter generation — pipeline & data model (packages/cli, packages/types)

  • No-newline markers filtered from parsed hunks (hosted #1132) with regression tests
  • Hosted ignore semantics: full DEFAULT_IGNORE_PATTERNS (7 new lockfiles, #871), one case-insensitive matcher so .stageignore! negations re-include defaults
  • Zero-hunk files (pure renames) included in Other Changes via the header-only sentinel
  • riskLevel/riskReasons + rootCause across types, DB (+migration), ingestion, routes
  • What-to-Review ordering by file order then start line (#865/#970); dense 0-based chapterIndex
  • prep: PULL REQUEST (title/body, 4k cap), STATS, and ADDITIONAL INSTRUCTIONS sections (.stageinstructions file + --instructions flag, hosted #1036 analog)
  • Repair-not-reject line refs; pre-assembled chapter files no longer bypass validation; literal-\n unescaping; consistent diff prefixes

Review UI (packages/web)

  • Activity tab: conversation timeline (gh-api-backed), review cards, review-comment diff previews (#1105), events column, read-only reactions
  • Continuous chapter review mode (Page/Scroll, #1083) with active-chapter preservation on mode switch
  • Risk badges, per-chapter/per-file comment counts, remaining-review-lines sticky header (#1107)
  • Markdown stack: shiki highlighting (#796/#826), mermaid in chapter summaries (#771), GitHub image proxy for private attachments (#820)
  • Diff extras: image diffs (base64 over the wire), full previews for moved files (#1106), virtualized file list, minimize inline comments
  • Small fixes: bot reviewer badges (#1131), resolve-button placement (#1133), sticky-header z-index (#1019), CI popover scroll (#1061), min-height floor (#1014), annotation tinting (#757/#1016), index j/k (#835), dark default theme (#819), derived chapter viewed state (#1021)
  • GitHub: stale pending-review recovery (#1072), label management (#1071)
  • GitHub viewed-file sync: marks/unmarks files on GitHub per hosted's rules and unions GitHub's viewed state into the local view state (PR runs, best-effort)
  • Merge: ruleset-aware allowed merge methods (#1057), single inline merge action with status chip and queue position (#1052)
  • Stacked-PR detection and navigation with ⌘⇧↑/⌘⇧↓ (#1049); entries with a local run navigate to it, others link to GitHub
  • Review panel keyboard shortcuts: ⌘J toggle, ⌘↩ submit

Configurability

  • Diff typography (font/size/line height/ligatures, #974), per-app-theme syntax themes (62), app text size (#1038), chapter panel position (#898), What-to-Review visibility (#1077)

Descoped (depend on hosted backends): Stagent chat, ⌘K action board, reaction toggling, timeline-side comment mutations, mobile layouts, AI chapter editing/regeneration UI.

Testing

  • pnpm typecheck, pnpm lint, pnpm test all green (73 files, 643 tests — including regression suites ported from hosted for the diff parser, file filtering, other-changes, line-ref repair, remaining-line counts, timeline assembly, full-file previews, and review recovery)
  • pnpm build (SPA + CLI bundle) succeeds

Open workspace in Conductor


Summary by cubic

Vendors the hosted Stage experience into the CLI so teams can keep using stagereview after the hosted app sunset, with generation parity, a full review UI, GitHub viewed-file sync, labels/stack/merge parity, and configurable display/settings. Also aligns the continuous chapter panel header with paged mode by reusing the shared chapter navigator, with in-page navigation to avoid remounts.

  • Bug Fixes

    • Drop stale comment‑draft store writes that settle after stack navigation.
    • Count outdated GitHub review threads via their original coordinates and carry them as a null‑anchored variant so file and chapter comment badges stay accurate.
    • Restore j/k navigation and scroll‑into‑view by typing the --content-top CSS variable, fixing keyboard and deep‑link scrolling in Files and chapter pages.
  • Refactors

    • Drop the legacy syntax‑theme localStorage migration; the curated single‑key setting now resets to defaults on upgrade. Remove hosted‑Stage provenance comments (no behavior change).

Written for commit 0f37e90. Summary will update on new commits.

Review in cubic

Port the hosted narrative/summary agent prompt content verbatim: full risk
classification rubric with riskLevel/riskReasons output fields, prologue
rootCause section, chapter-level mermaid diagram guidance, restored exemplar
density for motivation/outcome/keyChanges/focusAreas/complexity, keyChange
inline-markdown rule, and PR title/body + additional-instructions context
consumption. Fix stale hunks.txt/commits.txt references.
…e CLI
- Filter no-newline markers out of parsed hunk lines (hosted #1132) with
regression tests
- Vendor hosted DEFAULT_IGNORE_PATTERNS (adds 7 missing lockfiles, #871) and
hosted ignore semantics: one case-insensitive matcher so .stageignore
negations can re-include default-ignored files
- Include zero-hunk files (pure renames/moves) in the Other Changes chapter
via the HEADER_ONLY_OLD_START sentinel
- Add riskLevel/riskReasons to chapters (hosted #896) and rootCause to the
prologue (hosted #1051) across types, DB schema (+migration), ingestion,
persistence, and routes
- Order What to Review items by chapter file order, then start line
(hosted #865/#970)
- prep: add PULL REQUEST (title/body, 4k truncation), STATS, and ADDITIONAL
INSTRUCTIONS sections; instructions come from .stageinstructions and a new
--instructions flag (hosted #1036 analog)
- Repair-not-reject line refs like hosted: drop the startLine<=endLine refine
and lineRefs.min(1); sanitize instead, and stop bypassing validation for
pre-assembled chapter files
- Unescape literal \n sequences in summaries/key changes (hosted #772)
- Assign dense 0-based chapterIndex like hosted persist
- Force diff prefixes in view-time git diff args
- Add /api/image-proxy route for GitHub comment attachments (hosted #820)
- Shiki CodeBlock + highlighter singleton for fenced code blocks in all
markdown (hosted #796/#826)
- Render fenced mermaid blocks through the shared MermaidDiagram so chapter
summaries get diagrams (hosted #771)
- Rewrite GitHub attachment image URLs through /api/image-proxy so private
images load (hosted #820)
- Show review status badges for bot reviewers (hosted #1131)
- Move inline comment resolve button next to reply (hosted #1133)
- Keep sticky overview header above scrolling lists (hosted #1019)
- Scroll CI checks popover when the expanded list overflows (hosted #1061)
- Anchor the content column to the viewport min-height (hosted #1014)
- Tint inline comment annotation rows by diff line type (hosted #757/#1016)
- Wire j/k chapter navigation on the overview page (hosted #835)
- Default to dark theme, including the pre-hydration script (hosted #819)
- Derive chapter viewed state from file views (hosted #1021)
- Display chapters as order + 1 now that the wire order is the dense
0-based chapter index (hosted parity)
- Diff typography: font family presets, size, line height, ligatures
(hosted #974), with webfont loading in index.html
- Full syntax theme set with independent light/dark selection per app
theme, migrating the legacy single-key setting (hosted #974)
- App text size preference with pre-render application (hosted #1038)
- What to Review visibility consumption in chapter summaries (hosted #1077)
- Minimize inline comments setting, indicator component, and 'i' shortcut
- Chapter view (Page/Scroll) settings row
…header
- RiskBadge/RiskChip with riskReasons tooltip on the index list and
chapter panel (hosted #896/#1012)
- Chapter title block and actions menu with panel position and What to
Review controls (hosted #1012/#898/#1077)
- Left/top/right chapter panel positions (hosted #898)
- Real per-chapter and per-file comment counts from review threads,
replacing NO_COMMENT_COUNTS stubs
- Remaining review lines in the sticky header with total tooltip
(hosted #1107), with ported hosted tests
- Unmarking a chapter also clears its file views on the detail page
- Detect GITHUB_REVIEW_NOT_PENDING on review submit and recover
server-side: retry, dedupe an already-submitted decision, or open a
fresh review (hosted #1072), with ported test scenarios
- GitHub label display and add/remove management in the PR header with
luminance-based chip colors, gated on write access (hosted #1071),
backed by new /api label routes with CSRF guard and tests
- Minimize inline comments: collapsed annotation rows render the indicator
chip, 'i' toggles, composer forces rows open (hosted #1016 + minimize flow)
- Diff typography CSS variables feed Pierre from the new settings
- Per-app-theme syntax themes passed straight to Pierre (hosted parity)
- Image diff viewer with side-by-side layouts (hosted); the diff route now
ships base64 contents for binary images and rename-header contents for
pure renames so images and moved-file previews render locally
- Full-content previews for moved/renamed files (hosted #1106) with tests
- Virtualized file list via react-virtuoso with hosted's tuning; collapse
keeps rendered DOM and compensates sticky-header scroll
Port the Scroll chapter view (hosted #1083): one virtualized stream of all
chapter diffs with sticky per-chapter narrative panels, scroll-driven
active-chapter tracking, completion auto-advance, key-change focus, and
deep-link normalization between paged and continuous modes. Switching back
to Page mode lands on the chapter that was active in the stream via the
vendored ChapterViewState context.
- GitHub timeline assembly (issue comments, reviews with grouped comments
and resolved threads, commits/label/assign/merge events, reactions) via
gh api, ported from hosted's conversation module, with route + tests
- Conversation components: discussion timeline with hide-resolved and
hide-bots switches, review cards with sticky file headers (post-#1139),
review comment diff previews honoring diff settings (hosted #1105),
events/commits column, read-only reaction bars, loading skeleton
- Activity tab in the run layout, gated to PR runs, with comment count
- ChapterViewStateProvider mounted in the run layout
Descoped from hosted: reaction toggling and timeline-side comment
mutations (no local backend for those write paths).
Comment threadpackages/cli/src/routes/image-proxy.ts
Comment threadpackages/cli/src/runs/review.ts
@cursor
cursorBot requested a review from charleslpanAugust 10, 2026 04:38

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, Security Agent reported an unresolved high-severity issue, and this PR is above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:5d995b7d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/build-other-changes.ts
Comment threadpackages/cli/src/show.ts Outdated
Comment threadpackages/cli/src/github/timeline.ts
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/cli/src/routes/diff.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx Outdated
Comment threadpackages/web/src/routes/chapter-detail-page.tsx
Comment threadpackages/web/src/lib/use-timeline.ts

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 128 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/routes/continuous-chapters-page.tsx Outdated
Comment threadpackages/web/src/lib/full-file-preview.ts
Comment threadpackages/cli/src/github/review.ts Outdated
Comment threadpackages/web/src/lib/remaining-line-counts.ts Outdated
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx
Comment threadpackages/cli/src/__tests__/timeline-route-harness.ts Outdated
Comment threadpackages/web/src/components/chapter/risk-badge.tsx
Comment threadpackages/web/src/components/conversation/events-timeline.tsx
mod+j toggles the review tray and mod+enter submits when focus is inside
it, matching hosted's pending-review-panel bindings. Also registers the
stacked-PR navigation shortcuts for the upcoming stack nav.
- Respect base-branch ruleset merge methods: intersect repo-level flags
with PULL_REQUEST rule allowances and drop MERGE under required linear
history (hosted #1057), with all 10 hosted ruleset tests ported
- Replace the merge popover with a status chip and a single inline action
driven by getMergeAction — Merge/Auto-merge/Disable auto-merge/Leave
queue — gated on the per-PR viewerCanEnableAutoMerge flag (hosted #1052),
with the 14 decision-function tests and the xs button variant
- Show merge queue position in the status pill (hosted #1052)
Derive PR stacks on read from open base->head branch chains (hosted #1049,
algorithm and 12-case test suite ported verbatim) and show hosted's stack
navigator in the PR header. CLI adaptation: entries with a local run for
the same repo and PR number navigate to that run preserving the current
tab; entries without one open the PR on GitHub. mod+shift+up/down step
through the stack.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot skipped, an unresolved high-severity Security Agent finding remains, unresolved review threads are still open, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 21 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-action.ts
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/web/src/lib/utils/pull-request-status.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:570505304f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/routes/diff.ts Outdated
Comment threadpackages/web/src/lib/comment-counts.ts Outdated
Comment threadpackages/web/src/components/chapter/pierre-diff-viewer.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/cli/src/instructions.ts Outdated
Comment threadpackages/cli/src/github/pull-request-stack.ts Outdated
Comment threadpackages/web/src/routes/continuous-chapters-page.tsx
- Query and surface subjectType on pending comments so file-level
comments show hosted's File icon instead of being mislabeled Outdated
- Match hosted's panel: 520px popover, thin scrollbar on the pending
list, ShortcutTooltip trigger with the mod+j hint
- The list already included pending replies and renders through the same
compact layout as hosted's PendingCommentsList; the shared
CommentMarkdownEditor was already in place for the review body
@dastratakosdastratakos changed the title Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityfeat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityAug 10, 2026
Comment threadpackages/cli/src/show.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot completed as skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, and unresolved review threads remain above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

Pierre 1.1.20 isolates its pre element, flattening the diff into one paint
unit, so the light-DOM highlight boxes (z-2/z-3) painted over comment rows
(which Pierre pins at z-index 2). Release the isolation inside our already
isolated diff container and lift annotation rows to z-index 4 so comments
render above highlights while highlights stay visible over code lines.
The virtualized list pads the top of every item, but the page shell already
pads above the list, doubling the space before the first diff on the chapter
detail page and the Files tab. Skip the first item's padding to restore the
pre-virtuoso space-y-4 spacing. The continuous reader keeps hosted's
uniform padding — there the first file's gap separates it from the chapter
panel by design.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, unresolved review threads remain, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ba5b0d2. Configure here.

Comment threadpackages/cli/src/__tests__/pull-request.routes.test.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved high-severity finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ba5b0d2b1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/web/src/lib/use-reviewer-manager.ts
Comment threadpackages/cli/src/unescape.ts
Comment threadpackages/web/src/components/pull-request/pull-request-stack-nav.tsx Outdated
Comment threadpackages/cli/src/routes/view-state.ts
Comment threadpackages/web/src/routes/pull-request-layout.tsx Outdated

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b9b3e7. Configure here.

Comment threadpackages/cli/src/github/pull-request.ts Outdated

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/__tests__/view-state-github-harness.ts">
<violation number="1" location="packages/cli/src/__tests__/view-state-github-harness.ts:130">
P3: The shim hardcodes state OPEN on every pr list response, so the routes tests using this harness cannot exercise the closed/merged-PR fallback in getPullRequestOrThrow (pull-request.ts:196, listParsed.data.find(pr => pr.state === OPEN) ?? listParsed.data[0]). The available options (branchPrNumber or null) only cover the open-PR and no-PR cases, leaving the newest-closed-PR fallback and prefer-open ordering untested by the integration suite. Consider exposing a configurable pr-list entries option on the harness so that fallback gets regression coverage.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/cli/src/__tests__/view-state-github-harness.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The tray's pending list now reuses the Activity tab's ReviewThreadItem —
file header, diff-hunk line preview, thread header, and comment body —
instead of a bespoke card. The review query selects diffHunk, databaseId,
and original line coordinates so each pending draft maps onto the
Discussion panel's Thread shape; FILE and outdated drafts skip the
preview gracefully.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cd06993e8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/web/src/app/runs.$runId.tsx
Comment threadpackages/cli/src/github/review.ts
A comment submission that settles after the run switches must not close or
error a draft in the sibling run's store. Each write now carries the reset
generation its caller rendered with; the store drops writes from a
superseded generation.
Hosted's commentMatchesHunk falls back to original_line against the
old-file range for outdated comments (line nulled by GitHub); the CLI
dropped them from the wire entirely, so file and chapter badges lost
existing discussions the Activity tab still shows. Outdated line threads
now ride the wire as a null-anchored variant carrying their frozen
original coordinates — inline rendering already skips null anchors, and
the count builders apply hosted's fallback.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/comment-counts.ts
The twenty-fifth-round change made the layout set --content-top to
calc(3rem + <nav>px). Untyped custom properties compute to their raw
token stream, so the scroll code's parseFloat(getComputedStyle(...))
became NaN — Virtuoso silently rejects a NaN scrollToIndex offset,
killing j/k, v-advance, file-tree click-to-scroll, and line deep links
on the Files tab and chapter pages (the continuous-mode readers guard
with isFinite and only lost their sticky offset). Registering the
property as a typed <length> makes it compute to resolved pixels, fixing
every reader while keeping the text-size scaling.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The single-key curated theme value now just resets to defaults on
upgrade instead of seeding the per-app-theme keys.
Comments recording where code was vendored from (hosted file paths, PR
numbers, "matches hosted" equivalences) are review-time noise now that
the port is done. Rationales that referenced hosted are reworded to
state the constraint on their own; the only remaining "hosted" mentions
describe GitHub-hosted URLs and self-hosted git remotes.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit acfe195. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold. Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 72 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/use-diff-settings.tsx
The continuous panel now renders the shared ChapterNavigator — icon
viewed-toggle on the left, prev/next steppers, the chapter dropdown
selector, and the actions menu — instead of its bespoke ordinal header,
and drops its bg-card tint. The navigator takes an optional in-page
navigation override because the continuous reader navigates by
scrolling its stream: a /chapters/N link there would remount the whole
reader through the normalizing redirect.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f37e90. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with unresolved findings still open, and this PR exceeds the medium approval threshold. Human review is needed; a reviewer is already assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@dastratakos
dastratakos merged commit e8f485f into mainAug 11, 2026
8 checks passed
@dastratakos
dastratakos deleted the dastratakos/vendor-hosted-stage-into-cli branch August 11, 2026 23:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dastratakos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability - #75

Merged
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli
Aug 11, 2026
Merged

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability#75
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli

Conversation

@dastratakos

@dastratakosdastratakos commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The hosted product (ReviewStage/stage) is sunsetted; this PR vendors its unported functionality into the CLI so users can continue on stagereview. Everything is ported as closely as possible to the hosted implementation (code, prompts, constants, and tests copied verbatim where the architectures align), based on a six-dimension gap analysis of the two repos' code and git histories.

Changes

Chapter generation — prompts (skills/stage-chapters/SKILL.md)

  • Full risk-classification rubric with riskLevel/riskReasons outputs (hosted #896)
  • Prologue rootCause section (hosted #1051), chapter-level mermaid diagram guidance (hosted #771)
  • Restored hosted's full exemplar density, PR title/body + additional-instructions context, keyChange inline-markdown rule

Chapter generation — pipeline & data model (packages/cli, packages/types)

  • No-newline markers filtered from parsed hunks (hosted #1132) with regression tests
  • Hosted ignore semantics: full DEFAULT_IGNORE_PATTERNS (7 new lockfiles, #871), one case-insensitive matcher so .stageignore! negations re-include defaults
  • Zero-hunk files (pure renames) included in Other Changes via the header-only sentinel
  • riskLevel/riskReasons + rootCause across types, DB (+migration), ingestion, routes
  • What-to-Review ordering by file order then start line (#865/#970); dense 0-based chapterIndex
  • prep: PULL REQUEST (title/body, 4k cap), STATS, and ADDITIONAL INSTRUCTIONS sections (.stageinstructions file + --instructions flag, hosted #1036 analog)
  • Repair-not-reject line refs; pre-assembled chapter files no longer bypass validation; literal-\n unescaping; consistent diff prefixes

Review UI (packages/web)

  • Activity tab: conversation timeline (gh-api-backed), review cards, review-comment diff previews (#1105), events column, read-only reactions
  • Continuous chapter review mode (Page/Scroll, #1083) with active-chapter preservation on mode switch
  • Risk badges, per-chapter/per-file comment counts, remaining-review-lines sticky header (#1107)
  • Markdown stack: shiki highlighting (#796/#826), mermaid in chapter summaries (#771), GitHub image proxy for private attachments (#820)
  • Diff extras: image diffs (base64 over the wire), full previews for moved files (#1106), virtualized file list, minimize inline comments
  • Small fixes: bot reviewer badges (#1131), resolve-button placement (#1133), sticky-header z-index (#1019), CI popover scroll (#1061), min-height floor (#1014), annotation tinting (#757/#1016), index j/k (#835), dark default theme (#819), derived chapter viewed state (#1021)
  • GitHub: stale pending-review recovery (#1072), label management (#1071)
  • GitHub viewed-file sync: marks/unmarks files on GitHub per hosted's rules and unions GitHub's viewed state into the local view state (PR runs, best-effort)
  • Merge: ruleset-aware allowed merge methods (#1057), single inline merge action with status chip and queue position (#1052)
  • Stacked-PR detection and navigation with ⌘⇧↑/⌘⇧↓ (#1049); entries with a local run navigate to it, others link to GitHub
  • Review panel keyboard shortcuts: ⌘J toggle, ⌘↩ submit

Configurability

  • Diff typography (font/size/line height/ligatures, #974), per-app-theme syntax themes (62), app text size (#1038), chapter panel position (#898), What-to-Review visibility (#1077)

Descoped (depend on hosted backends): Stagent chat, ⌘K action board, reaction toggling, timeline-side comment mutations, mobile layouts, AI chapter editing/regeneration UI.

Testing

  • pnpm typecheck, pnpm lint, pnpm test all green (73 files, 643 tests — including regression suites ported from hosted for the diff parser, file filtering, other-changes, line-ref repair, remaining-line counts, timeline assembly, full-file previews, and review recovery)
  • pnpm build (SPA + CLI bundle) succeeds

Open workspace in Conductor


Summary by cubic

Vendors the hosted Stage experience into the CLI so teams can keep using stagereview after the hosted app sunset, with generation parity, a full review UI, GitHub viewed-file sync, labels/stack/merge parity, and configurable display/settings. Also aligns the continuous chapter panel header with paged mode by reusing the shared chapter navigator, with in-page navigation to avoid remounts.

  • Bug Fixes

    • Drop stale comment‑draft store writes that settle after stack navigation.
    • Count outdated GitHub review threads via their original coordinates and carry them as a null‑anchored variant so file and chapter comment badges stay accurate.
    • Restore j/k navigation and scroll‑into‑view by typing the --content-top CSS variable, fixing keyboard and deep‑link scrolling in Files and chapter pages.
  • Refactors

    • Drop the legacy syntax‑theme localStorage migration; the curated single‑key setting now resets to defaults on upgrade. Remove hosted‑Stage provenance comments (no behavior change).

Written for commit 0f37e90. Summary will update on new commits.

Review in cubic

Port the hosted narrative/summary agent prompt content verbatim: full risk
classification rubric with riskLevel/riskReasons output fields, prologue
rootCause section, chapter-level mermaid diagram guidance, restored exemplar
density for motivation/outcome/keyChanges/focusAreas/complexity, keyChange
inline-markdown rule, and PR title/body + additional-instructions context
consumption. Fix stale hunks.txt/commits.txt references.
…e CLI
- Filter no-newline markers out of parsed hunk lines (hosted #1132) with
regression tests
- Vendor hosted DEFAULT_IGNORE_PATTERNS (adds 7 missing lockfiles, #871) and
hosted ignore semantics: one case-insensitive matcher so .stageignore
negations can re-include default-ignored files
- Include zero-hunk files (pure renames/moves) in the Other Changes chapter
via the HEADER_ONLY_OLD_START sentinel
- Add riskLevel/riskReasons to chapters (hosted #896) and rootCause to the
prologue (hosted #1051) across types, DB schema (+migration), ingestion,
persistence, and routes
- Order What to Review items by chapter file order, then start line
(hosted #865/#970)
- prep: add PULL REQUEST (title/body, 4k truncation), STATS, and ADDITIONAL
INSTRUCTIONS sections; instructions come from .stageinstructions and a new
--instructions flag (hosted #1036 analog)
- Repair-not-reject line refs like hosted: drop the startLine<=endLine refine
and lineRefs.min(1); sanitize instead, and stop bypassing validation for
pre-assembled chapter files
- Unescape literal \n sequences in summaries/key changes (hosted #772)
- Assign dense 0-based chapterIndex like hosted persist
- Force diff prefixes in view-time git diff args
- Add /api/image-proxy route for GitHub comment attachments (hosted #820)
- Shiki CodeBlock + highlighter singleton for fenced code blocks in all
markdown (hosted #796/#826)
- Render fenced mermaid blocks through the shared MermaidDiagram so chapter
summaries get diagrams (hosted #771)
- Rewrite GitHub attachment image URLs through /api/image-proxy so private
images load (hosted #820)
- Show review status badges for bot reviewers (hosted #1131)
- Move inline comment resolve button next to reply (hosted #1133)
- Keep sticky overview header above scrolling lists (hosted #1019)
- Scroll CI checks popover when the expanded list overflows (hosted #1061)
- Anchor the content column to the viewport min-height (hosted #1014)
- Tint inline comment annotation rows by diff line type (hosted #757/#1016)
- Wire j/k chapter navigation on the overview page (hosted #835)
- Default to dark theme, including the pre-hydration script (hosted #819)
- Derive chapter viewed state from file views (hosted #1021)
- Display chapters as order + 1 now that the wire order is the dense
0-based chapter index (hosted parity)
- Diff typography: font family presets, size, line height, ligatures
(hosted #974), with webfont loading in index.html
- Full syntax theme set with independent light/dark selection per app
theme, migrating the legacy single-key setting (hosted #974)
- App text size preference with pre-render application (hosted #1038)
- What to Review visibility consumption in chapter summaries (hosted #1077)
- Minimize inline comments setting, indicator component, and 'i' shortcut
- Chapter view (Page/Scroll) settings row
…header
- RiskBadge/RiskChip with riskReasons tooltip on the index list and
chapter panel (hosted #896/#1012)
- Chapter title block and actions menu with panel position and What to
Review controls (hosted #1012/#898/#1077)
- Left/top/right chapter panel positions (hosted #898)
- Real per-chapter and per-file comment counts from review threads,
replacing NO_COMMENT_COUNTS stubs
- Remaining review lines in the sticky header with total tooltip
(hosted #1107), with ported hosted tests
- Unmarking a chapter also clears its file views on the detail page
- Detect GITHUB_REVIEW_NOT_PENDING on review submit and recover
server-side: retry, dedupe an already-submitted decision, or open a
fresh review (hosted #1072), with ported test scenarios
- GitHub label display and add/remove management in the PR header with
luminance-based chip colors, gated on write access (hosted #1071),
backed by new /api label routes with CSRF guard and tests
- Minimize inline comments: collapsed annotation rows render the indicator
chip, 'i' toggles, composer forces rows open (hosted #1016 + minimize flow)
- Diff typography CSS variables feed Pierre from the new settings
- Per-app-theme syntax themes passed straight to Pierre (hosted parity)
- Image diff viewer with side-by-side layouts (hosted); the diff route now
ships base64 contents for binary images and rename-header contents for
pure renames so images and moved-file previews render locally
- Full-content previews for moved/renamed files (hosted #1106) with tests
- Virtualized file list via react-virtuoso with hosted's tuning; collapse
keeps rendered DOM and compensates sticky-header scroll
Port the Scroll chapter view (hosted #1083): one virtualized stream of all
chapter diffs with sticky per-chapter narrative panels, scroll-driven
active-chapter tracking, completion auto-advance, key-change focus, and
deep-link normalization between paged and continuous modes. Switching back
to Page mode lands on the chapter that was active in the stream via the
vendored ChapterViewState context.
- GitHub timeline assembly (issue comments, reviews with grouped comments
and resolved threads, commits/label/assign/merge events, reactions) via
gh api, ported from hosted's conversation module, with route + tests
- Conversation components: discussion timeline with hide-resolved and
hide-bots switches, review cards with sticky file headers (post-#1139),
review comment diff previews honoring diff settings (hosted #1105),
events/commits column, read-only reaction bars, loading skeleton
- Activity tab in the run layout, gated to PR runs, with comment count
- ChapterViewStateProvider mounted in the run layout
Descoped from hosted: reaction toggling and timeline-side comment
mutations (no local backend for those write paths).
Comment threadpackages/cli/src/routes/image-proxy.ts
Comment threadpackages/cli/src/runs/review.ts
@cursor
cursorBot requested a review from charleslpanAugust 10, 2026 04:38

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, Security Agent reported an unresolved high-severity issue, and this PR is above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:5d995b7d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/build-other-changes.ts
Comment threadpackages/cli/src/show.ts Outdated
Comment threadpackages/cli/src/github/timeline.ts
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/cli/src/routes/diff.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx Outdated
Comment threadpackages/web/src/routes/chapter-detail-page.tsx
Comment threadpackages/web/src/lib/use-timeline.ts

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 128 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/routes/continuous-chapters-page.tsx Outdated
Comment threadpackages/web/src/lib/full-file-preview.ts
Comment threadpackages/cli/src/github/review.ts Outdated
Comment threadpackages/web/src/lib/remaining-line-counts.ts Outdated
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx
Comment threadpackages/cli/src/__tests__/timeline-route-harness.ts Outdated
Comment threadpackages/web/src/components/chapter/risk-badge.tsx
Comment threadpackages/web/src/components/conversation/events-timeline.tsx
mod+j toggles the review tray and mod+enter submits when focus is inside
it, matching hosted's pending-review-panel bindings. Also registers the
stacked-PR navigation shortcuts for the upcoming stack nav.
- Respect base-branch ruleset merge methods: intersect repo-level flags
with PULL_REQUEST rule allowances and drop MERGE under required linear
history (hosted #1057), with all 10 hosted ruleset tests ported
- Replace the merge popover with a status chip and a single inline action
driven by getMergeAction — Merge/Auto-merge/Disable auto-merge/Leave
queue — gated on the per-PR viewerCanEnableAutoMerge flag (hosted #1052),
with the 14 decision-function tests and the xs button variant
- Show merge queue position in the status pill (hosted #1052)
Derive PR stacks on read from open base->head branch chains (hosted #1049,
algorithm and 12-case test suite ported verbatim) and show hosted's stack
navigator in the PR header. CLI adaptation: entries with a local run for
the same repo and PR number navigate to that run preserving the current
tab; entries without one open the PR on GitHub. mod+shift+up/down step
through the stack.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot skipped, an unresolved high-severity Security Agent finding remains, unresolved review threads are still open, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 21 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-action.ts
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/web/src/lib/utils/pull-request-status.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:570505304f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/routes/diff.ts Outdated
Comment threadpackages/web/src/lib/comment-counts.ts Outdated
Comment threadpackages/web/src/components/chapter/pierre-diff-viewer.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/cli/src/instructions.ts Outdated
Comment threadpackages/cli/src/github/pull-request-stack.ts Outdated
Comment threadpackages/web/src/routes/continuous-chapters-page.tsx
- Query and surface subjectType on pending comments so file-level
comments show hosted's File icon instead of being mislabeled Outdated
- Match hosted's panel: 520px popover, thin scrollbar on the pending
list, ShortcutTooltip trigger with the mod+j hint
- The list already included pending replies and renders through the same
compact layout as hosted's PendingCommentsList; the shared
CommentMarkdownEditor was already in place for the review body
@dastratakosdastratakos changed the title Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityfeat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityAug 10, 2026
Comment threadpackages/cli/src/show.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot completed as skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, and unresolved review threads remain above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

Pierre 1.1.20 isolates its pre element, flattening the diff into one paint
unit, so the light-DOM highlight boxes (z-2/z-3) painted over comment rows
(which Pierre pins at z-index 2). Release the isolation inside our already
isolated diff container and lift annotation rows to z-index 4 so comments
render above highlights while highlights stay visible over code lines.
The virtualized list pads the top of every item, but the page shell already
pads above the list, doubling the space before the first diff on the chapter
detail page and the Files tab. Skip the first item's padding to restore the
pre-virtuoso space-y-4 spacing. The continuous reader keeps hosted's
uniform padding — there the first file's gap separates it from the chapter
panel by design.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, unresolved review threads remain, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ba5b0d2. Configure here.

Comment threadpackages/cli/src/__tests__/pull-request.routes.test.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved high-severity finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ba5b0d2b1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/web/src/lib/use-reviewer-manager.ts
Comment threadpackages/cli/src/unescape.ts
Comment threadpackages/web/src/components/pull-request/pull-request-stack-nav.tsx Outdated
Comment threadpackages/cli/src/routes/view-state.ts
Comment threadpackages/web/src/routes/pull-request-layout.tsx Outdated

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b9b3e7. Configure here.

Comment threadpackages/cli/src/github/pull-request.ts Outdated

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/__tests__/view-state-github-harness.ts">
<violation number="1" location="packages/cli/src/__tests__/view-state-github-harness.ts:130">
P3: The shim hardcodes state OPEN on every pr list response, so the routes tests using this harness cannot exercise the closed/merged-PR fallback in getPullRequestOrThrow (pull-request.ts:196, listParsed.data.find(pr => pr.state === OPEN) ?? listParsed.data[0]). The available options (branchPrNumber or null) only cover the open-PR and no-PR cases, leaving the newest-closed-PR fallback and prefer-open ordering untested by the integration suite. Consider exposing a configurable pr-list entries option on the harness so that fallback gets regression coverage.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/cli/src/__tests__/view-state-github-harness.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The tray's pending list now reuses the Activity tab's ReviewThreadItem —
file header, diff-hunk line preview, thread header, and comment body —
instead of a bespoke card. The review query selects diffHunk, databaseId,
and original line coordinates so each pending draft maps onto the
Discussion panel's Thread shape; FILE and outdated drafts skip the
preview gracefully.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cd06993e8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/web/src/app/runs.$runId.tsx
Comment threadpackages/cli/src/github/review.ts
A comment submission that settles after the run switches must not close or
error a draft in the sibling run's store. Each write now carries the reset
generation its caller rendered with; the store drops writes from a
superseded generation.
Hosted's commentMatchesHunk falls back to original_line against the
old-file range for outdated comments (line nulled by GitHub); the CLI
dropped them from the wire entirely, so file and chapter badges lost
existing discussions the Activity tab still shows. Outdated line threads
now ride the wire as a null-anchored variant carrying their frozen
original coordinates — inline rendering already skips null anchors, and
the count builders apply hosted's fallback.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/comment-counts.ts
The twenty-fifth-round change made the layout set --content-top to
calc(3rem + <nav>px). Untyped custom properties compute to their raw
token stream, so the scroll code's parseFloat(getComputedStyle(...))
became NaN — Virtuoso silently rejects a NaN scrollToIndex offset,
killing j/k, v-advance, file-tree click-to-scroll, and line deep links
on the Files tab and chapter pages (the continuous-mode readers guard
with isFinite and only lost their sticky offset). Registering the
property as a typed <length> makes it compute to resolved pixels, fixing
every reader while keeping the text-size scaling.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The single-key curated theme value now just resets to defaults on
upgrade instead of seeding the per-app-theme keys.
Comments recording where code was vendored from (hosted file paths, PR
numbers, "matches hosted" equivalences) are review-time noise now that
the port is done. Rationales that referenced hosted are reworded to
state the constraint on their own; the only remaining "hosted" mentions
describe GitHub-hosted URLs and self-hosted git remotes.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit acfe195. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold. Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 72 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/use-diff-settings.tsx
The continuous panel now renders the shared ChapterNavigator — icon
viewed-toggle on the left, prev/next steppers, the chapter dropdown
selector, and the actions menu — instead of its bespoke ordinal header,
and drops its bg-card tint. The navigator takes an optional in-page
navigation override because the continuous reader navigates by
scrolling its stream: a /chapters/N link there would remount the whole
reader through the normalizing redirect.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f37e90. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with unresolved findings still open, and this PR exceeds the medium approval threshold. Human review is needed; a reviewer is already assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@dastratakos
dastratakos merged commit e8f485f into mainAug 11, 2026
8 checks passed
@dastratakos
dastratakos deleted the dastratakos/vendor-hosted-stage-into-cli branch August 11, 2026 23:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dastratakos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability - #75

Merged
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli
Aug 11, 2026
Merged

feat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurability#75
dastratakos merged 88 commits into
mainfrom
dastratakos/vendor-hosted-stage-into-cli

Conversation

@dastratakos

@dastratakosdastratakos commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The hosted product (ReviewStage/stage) is sunsetted; this PR vendors its unported functionality into the CLI so users can continue on stagereview. Everything is ported as closely as possible to the hosted implementation (code, prompts, constants, and tests copied verbatim where the architectures align), based on a six-dimension gap analysis of the two repos' code and git histories.

Changes

Chapter generation — prompts (skills/stage-chapters/SKILL.md)

  • Full risk-classification rubric with riskLevel/riskReasons outputs (hosted #896)
  • Prologue rootCause section (hosted #1051), chapter-level mermaid diagram guidance (hosted #771)
  • Restored hosted's full exemplar density, PR title/body + additional-instructions context, keyChange inline-markdown rule

Chapter generation — pipeline & data model (packages/cli, packages/types)

  • No-newline markers filtered from parsed hunks (hosted #1132) with regression tests
  • Hosted ignore semantics: full DEFAULT_IGNORE_PATTERNS (7 new lockfiles, #871), one case-insensitive matcher so .stageignore! negations re-include defaults
  • Zero-hunk files (pure renames) included in Other Changes via the header-only sentinel
  • riskLevel/riskReasons + rootCause across types, DB (+migration), ingestion, routes
  • What-to-Review ordering by file order then start line (#865/#970); dense 0-based chapterIndex
  • prep: PULL REQUEST (title/body, 4k cap), STATS, and ADDITIONAL INSTRUCTIONS sections (.stageinstructions file + --instructions flag, hosted #1036 analog)
  • Repair-not-reject line refs; pre-assembled chapter files no longer bypass validation; literal-\n unescaping; consistent diff prefixes

Review UI (packages/web)

  • Activity tab: conversation timeline (gh-api-backed), review cards, review-comment diff previews (#1105), events column, read-only reactions
  • Continuous chapter review mode (Page/Scroll, #1083) with active-chapter preservation on mode switch
  • Risk badges, per-chapter/per-file comment counts, remaining-review-lines sticky header (#1107)
  • Markdown stack: shiki highlighting (#796/#826), mermaid in chapter summaries (#771), GitHub image proxy for private attachments (#820)
  • Diff extras: image diffs (base64 over the wire), full previews for moved files (#1106), virtualized file list, minimize inline comments
  • Small fixes: bot reviewer badges (#1131), resolve-button placement (#1133), sticky-header z-index (#1019), CI popover scroll (#1061), min-height floor (#1014), annotation tinting (#757/#1016), index j/k (#835), dark default theme (#819), derived chapter viewed state (#1021)
  • GitHub: stale pending-review recovery (#1072), label management (#1071)
  • GitHub viewed-file sync: marks/unmarks files on GitHub per hosted's rules and unions GitHub's viewed state into the local view state (PR runs, best-effort)
  • Merge: ruleset-aware allowed merge methods (#1057), single inline merge action with status chip and queue position (#1052)
  • Stacked-PR detection and navigation with ⌘⇧↑/⌘⇧↓ (#1049); entries with a local run navigate to it, others link to GitHub
  • Review panel keyboard shortcuts: ⌘J toggle, ⌘↩ submit

Configurability

  • Diff typography (font/size/line height/ligatures, #974), per-app-theme syntax themes (62), app text size (#1038), chapter panel position (#898), What-to-Review visibility (#1077)

Descoped (depend on hosted backends): Stagent chat, ⌘K action board, reaction toggling, timeline-side comment mutations, mobile layouts, AI chapter editing/regeneration UI.

Testing

  • pnpm typecheck, pnpm lint, pnpm test all green (73 files, 643 tests — including regression suites ported from hosted for the diff parser, file filtering, other-changes, line-ref repair, remaining-line counts, timeline assembly, full-file previews, and review recovery)
  • pnpm build (SPA + CLI bundle) succeeds

Open workspace in Conductor


Summary by cubic

Vendors the hosted Stage experience into the CLI so teams can keep using stagereview after the hosted app sunset, with generation parity, a full review UI, GitHub viewed-file sync, labels/stack/merge parity, and configurable display/settings. Also aligns the continuous chapter panel header with paged mode by reusing the shared chapter navigator, with in-page navigation to avoid remounts.

  • Bug Fixes

    • Drop stale comment‑draft store writes that settle after stack navigation.
    • Count outdated GitHub review threads via their original coordinates and carry them as a null‑anchored variant so file and chapter comment badges stay accurate.
    • Restore j/k navigation and scroll‑into‑view by typing the --content-top CSS variable, fixing keyboard and deep‑link scrolling in Files and chapter pages.
  • Refactors

    • Drop the legacy syntax‑theme localStorage migration; the curated single‑key setting now resets to defaults on upgrade. Remove hosted‑Stage provenance comments (no behavior change).

Written for commit 0f37e90. Summary will update on new commits.

Review in cubic

Port the hosted narrative/summary agent prompt content verbatim: full risk
classification rubric with riskLevel/riskReasons output fields, prologue
rootCause section, chapter-level mermaid diagram guidance, restored exemplar
density for motivation/outcome/keyChanges/focusAreas/complexity, keyChange
inline-markdown rule, and PR title/body + additional-instructions context
consumption. Fix stale hunks.txt/commits.txt references.
…e CLI
- Filter no-newline markers out of parsed hunk lines (hosted #1132) with
regression tests
- Vendor hosted DEFAULT_IGNORE_PATTERNS (adds 7 missing lockfiles, #871) and
hosted ignore semantics: one case-insensitive matcher so .stageignore
negations can re-include default-ignored files
- Include zero-hunk files (pure renames/moves) in the Other Changes chapter
via the HEADER_ONLY_OLD_START sentinel
- Add riskLevel/riskReasons to chapters (hosted #896) and rootCause to the
prologue (hosted #1051) across types, DB schema (+migration), ingestion,
persistence, and routes
- Order What to Review items by chapter file order, then start line
(hosted #865/#970)
- prep: add PULL REQUEST (title/body, 4k truncation), STATS, and ADDITIONAL
INSTRUCTIONS sections; instructions come from .stageinstructions and a new
--instructions flag (hosted #1036 analog)
- Repair-not-reject line refs like hosted: drop the startLine<=endLine refine
and lineRefs.min(1); sanitize instead, and stop bypassing validation for
pre-assembled chapter files
- Unescape literal \n sequences in summaries/key changes (hosted #772)
- Assign dense 0-based chapterIndex like hosted persist
- Force diff prefixes in view-time git diff args
- Add /api/image-proxy route for GitHub comment attachments (hosted #820)
- Shiki CodeBlock + highlighter singleton for fenced code blocks in all
markdown (hosted #796/#826)
- Render fenced mermaid blocks through the shared MermaidDiagram so chapter
summaries get diagrams (hosted #771)
- Rewrite GitHub attachment image URLs through /api/image-proxy so private
images load (hosted #820)
- Show review status badges for bot reviewers (hosted #1131)
- Move inline comment resolve button next to reply (hosted #1133)
- Keep sticky overview header above scrolling lists (hosted #1019)
- Scroll CI checks popover when the expanded list overflows (hosted #1061)
- Anchor the content column to the viewport min-height (hosted #1014)
- Tint inline comment annotation rows by diff line type (hosted #757/#1016)
- Wire j/k chapter navigation on the overview page (hosted #835)
- Default to dark theme, including the pre-hydration script (hosted #819)
- Derive chapter viewed state from file views (hosted #1021)
- Display chapters as order + 1 now that the wire order is the dense
0-based chapter index (hosted parity)
- Diff typography: font family presets, size, line height, ligatures
(hosted #974), with webfont loading in index.html
- Full syntax theme set with independent light/dark selection per app
theme, migrating the legacy single-key setting (hosted #974)
- App text size preference with pre-render application (hosted #1038)
- What to Review visibility consumption in chapter summaries (hosted #1077)
- Minimize inline comments setting, indicator component, and 'i' shortcut
- Chapter view (Page/Scroll) settings row
…header
- RiskBadge/RiskChip with riskReasons tooltip on the index list and
chapter panel (hosted #896/#1012)
- Chapter title block and actions menu with panel position and What to
Review controls (hosted #1012/#898/#1077)
- Left/top/right chapter panel positions (hosted #898)
- Real per-chapter and per-file comment counts from review threads,
replacing NO_COMMENT_COUNTS stubs
- Remaining review lines in the sticky header with total tooltip
(hosted #1107), with ported hosted tests
- Unmarking a chapter also clears its file views on the detail page
- Detect GITHUB_REVIEW_NOT_PENDING on review submit and recover
server-side: retry, dedupe an already-submitted decision, or open a
fresh review (hosted #1072), with ported test scenarios
- GitHub label display and add/remove management in the PR header with
luminance-based chip colors, gated on write access (hosted #1071),
backed by new /api label routes with CSRF guard and tests
- Minimize inline comments: collapsed annotation rows render the indicator
chip, 'i' toggles, composer forces rows open (hosted #1016 + minimize flow)
- Diff typography CSS variables feed Pierre from the new settings
- Per-app-theme syntax themes passed straight to Pierre (hosted parity)
- Image diff viewer with side-by-side layouts (hosted); the diff route now
ships base64 contents for binary images and rename-header contents for
pure renames so images and moved-file previews render locally
- Full-content previews for moved/renamed files (hosted #1106) with tests
- Virtualized file list via react-virtuoso with hosted's tuning; collapse
keeps rendered DOM and compensates sticky-header scroll
Port the Scroll chapter view (hosted #1083): one virtualized stream of all
chapter diffs with sticky per-chapter narrative panels, scroll-driven
active-chapter tracking, completion auto-advance, key-change focus, and
deep-link normalization between paged and continuous modes. Switching back
to Page mode lands on the chapter that was active in the stream via the
vendored ChapterViewState context.
- GitHub timeline assembly (issue comments, reviews with grouped comments
and resolved threads, commits/label/assign/merge events, reactions) via
gh api, ported from hosted's conversation module, with route + tests
- Conversation components: discussion timeline with hide-resolved and
hide-bots switches, review cards with sticky file headers (post-#1139),
review comment diff previews honoring diff settings (hosted #1105),
events/commits column, read-only reaction bars, loading skeleton
- Activity tab in the run layout, gated to PR runs, with comment count
- ChapterViewStateProvider mounted in the run layout
Descoped from hosted: reaction toggling and timeline-side comment
mutations (no local backend for those write paths).
Comment threadpackages/cli/src/routes/image-proxy.ts
Comment threadpackages/cli/src/runs/review.ts
@cursor
cursorBot requested a review from charleslpanAugust 10, 2026 04:38

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, Security Agent reported an unresolved high-severity issue, and this PR is above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:5d995b7d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/build-other-changes.ts
Comment threadpackages/cli/src/show.ts Outdated
Comment threadpackages/cli/src/github/timeline.ts
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/cli/src/routes/diff.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx Outdated
Comment threadpackages/web/src/routes/chapter-detail-page.tsx
Comment threadpackages/web/src/lib/use-timeline.ts

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 128 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/routes/continuous-chapters-page.tsx Outdated
Comment threadpackages/web/src/lib/full-file-preview.ts
Comment threadpackages/cli/src/github/review.ts Outdated
Comment threadpackages/web/src/lib/remaining-line-counts.ts Outdated
Comment threadpackages/types/src/prologue.ts
Comment threadpackages/web/src/components/pull-request/labels.tsx
Comment threadpackages/cli/src/__tests__/timeline-route-harness.ts Outdated
Comment threadpackages/web/src/components/chapter/risk-badge.tsx
Comment threadpackages/web/src/components/conversation/events-timeline.tsx
mod+j toggles the review tray and mod+enter submits when focus is inside
it, matching hosted's pending-review-panel bindings. Also registers the
stacked-PR navigation shortcuts for the upcoming stack nav.
- Respect base-branch ruleset merge methods: intersect repo-level flags
with PULL_REQUEST rule allowances and drop MERGE under required linear
history (hosted #1057), with all 10 hosted ruleset tests ported
- Replace the merge popover with a status chip and a single inline action
driven by getMergeAction — Merge/Auto-merge/Disable auto-merge/Leave
queue — gated on the per-PR viewerCanEnableAutoMerge flag (hosted #1052),
with the 14 decision-function tests and the xs button variant
- Show merge queue position in the status pill (hosted #1052)
Derive PR stacks on read from open base->head branch chains (hosted #1049,
algorithm and 12-case test suite ported verbatim) and show hosted's stack
navigator in the PR header. CLI adaptation: entries with a local run for
the same repo and PR number navigate to that run preserving the current
tab; entries without one open the PR on GitHub. mod+shift+up/down step
through the stack.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot skipped, an unresolved high-severity Security Agent finding remains, unresolved review threads are still open, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 21 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-action.ts
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/web/src/lib/utils/pull-request-status.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:570505304f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/routes/diff.ts Outdated
Comment threadpackages/web/src/lib/comment-counts.ts Outdated
Comment threadpackages/web/src/components/chapter/pierre-diff-viewer.tsx Outdated
Comment threadpackages/web/src/components/pull-request/merge-status.tsx
Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/cli/src/instructions.ts Outdated
Comment threadpackages/cli/src/github/pull-request-stack.ts Outdated
Comment threadpackages/web/src/routes/continuous-chapters-page.tsx
- Query and surface subjectType on pending comments so file-level
comments show hosted's File icon instead of being mislabeled Outdated
- Match hosted's panel: 520px popover, thin scrollbar on the pending
list, ShortcutTooltip trigger with the mod+j hint
- The list already included pending replies and renders through the same
compact layout as hosted's PendingCommentsList; the shared
CommentMarkdownEditor was already in place for the review body
@dastratakosdastratakos changed the title Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityfeat: Vendor hosted Stage into the CLI: generation parity, review UI, and configurabilityAug 10, 2026
Comment threadpackages/cli/src/show.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot completed as skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, and unresolved review threads remain above the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

Pierre 1.1.20 isolates its pre element, flattening the diff into one paint
unit, so the light-DOM highlight boxes (z-2/z-3) painted over comment rows
(which Pierre pins at z-index 2). Release the isolation inside our already
isolated diff container and lift annotation rows to z-index 4 so comments
render above highlights while highlights stay visible over code lines.
The virtualized list pads the top of every item, but the page shell already
pads above the list, doubling the space before the first diff on the chapter
detail page and the Files tab. Skip the first item's padding to restore the
pre-virtuoso space-y-4 spacing. The continuous reader keeps hosted's
uniform padding — there the first file's gap separates it from the chapter
panel by design.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Bugbot skipped with an unresolved finding, an unresolved high-severity Security Agent finding remains, unresolved review threads remain, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ba5b0d2. Configure here.

Comment threadpackages/cli/src/__tests__/pull-request.routes.test.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved high-severity finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ba5b0d2b1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/cli/src/runs/review.ts
Comment threadpackages/web/src/lib/use-reviewer-manager.ts
Comment threadpackages/cli/src/unescape.ts
Comment threadpackages/web/src/components/pull-request/pull-request-stack-nav.tsx Outdated
Comment threadpackages/cli/src/routes/view-state.ts
Comment threadpackages/web/src/routes/pull-request-layout.tsx Outdated

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b9b3e7. Configure here.

Comment threadpackages/cli/src/github/pull-request.ts Outdated

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/__tests__/view-state-github-harness.ts">
<violation number="1" location="packages/cli/src/__tests__/view-state-github-harness.ts:130">
P3: The shim hardcodes state OPEN on every pr list response, so the routes tests using this harness cannot exercise the closed/merged-PR fallback in getPullRequestOrThrow (pull-request.ts:196, listParsed.data.find(pr => pr.state === OPEN) ?? listParsed.data[0]). The available options (branchPrNumber or null) only cover the open-PR and no-PR cases, leaving the newest-closed-PR fallback and prefer-open ordering untested by the integration suite. Consider exposing a configurable pr-list entries option on the harness so that fallback gets regression coverage.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/cli/src/__tests__/view-state-github-harness.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The tray's pending list now reuses the Activity tab's ReviewThreadItem —
file header, diff-hunk line preview, thread header, and comment body —
instead of a bespoke card. The review query selects diffHunk, databaseId,
and original line coordinates so each pending draft maps onto the
Discussion panel's Thread shape; FILE and outdated drafts skip the
preview gracefully.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped, and this PR exceeds the medium approval threshold (migrations, GitHub/token-backed routes, lockfile, cross-cutting CLI/web). Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/components/pull-request/review-panel.tsx

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cd06993e8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadpackages/web/src/app/runs.$runId.tsx
Comment threadpackages/cli/src/github/review.ts
A comment submission that settles after the run switches must not close or
error a draft in the sibling run's store. Each write now carries the reset
generation its caller rendered with; the store drops writes from a
superseded generation.
Hosted's commentMatchesHunk falls back to original_line against the
old-file range for outdated comments (line nulled by GitHub); the CLI
dropped them from the wire entirely, so file and chapter badges lost
existing discussions the Activity tab still shows. Outdated line threads
now ride the wire as a null-anchored variant carrying their frozen
original coordinates — inline rendering already skips null anchors, and
the count builders apply hosted's fallback.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/comment-counts.ts
The twenty-fifth-round change made the layout set --content-top to
calc(3rem + <nav>px). Untyped custom properties compute to their raw
token stream, so the scroll code's parseFloat(getComputedStyle(...))
became NaN — Virtuoso silently rejects a NaN scrollToIndex offset,
killing j/k, v-advance, file-tree click-to-scroll, and line deep links
on the Files tab and chapter pages (the continuous-mode readers guard
with isFinite and only lost their sticky offset). Registering the
property as a typed <length> makes it compute to resolved pixels, fixing
every reader while keeping the text-size scaling.

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and assigned reviewers. Not approving: Cursor Bugbot completed as skipped, and this PR exceeds the medium risk threshold.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

The single-key curated theme value now just resets to defaults on
upgrade instead of seeding the per-app-theme keys.
Comments recording where code was vendored from (hosted file paths, PR
numbers, "matches hosted" equivalences) are review-time noise now that
the port is done. Rationales that referenced hosted are reworded to
state the constraint on their own; the only remaining "hosted" mentions
describe GitHub-hosted URLs and self-hosted git remotes.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit acfe195. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Stale comment

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with an unresolved finding still open, and this PR exceeds the medium approval threshold. Human review is needed; assigning reviewers.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cubic-dev-aicubic-dev-aiBot 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.

All reported issues were addressed across 72 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment threadpackages/web/src/lib/use-diff-settings.tsx
The continuous panel now renders the shared ChapterNavigator — icon
viewed-toggle on the left, prev/next steppers, the chapter dropdown
selector, and the actions menu — instead of its bespoke ordinal header,
and drops its bg-card tint. The navigator takes an optional in-page
navigation override because the continuous reader navigates by
scrolling its stream: a /chapters/N link there would remount the whole
reader through the normalizing redirect.

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f37e90. Configure here.

Comment threadpackages/web/src/lib/comment-counts.ts

@cursorcursorBot 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.

Risk: high. Left a non-blocking comment and did not approve: Cursor Bugbot completed as skipped with unresolved findings still open, and this PR exceeds the medium approval threshold. Human review is needed; a reviewer is already assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@dastratakos
dastratakos merged commit e8f485f into mainAug 11, 2026
8 checks passed
@dastratakos
dastratakos deleted the dastratakos/vendor-hosted-stage-into-cli branch August 11, 2026 23:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dastratakos