Skip to content

Merge upstream pingdotgg/t3code main (v0.0.5 → v0.0.9)#3

Merged
aaditagrawal merged 35 commits intomainfrom
merge/upstream-main
Mar 9, 2026
Merged

Merge upstream pingdotgg/t3code main (v0.0.5 → v0.0.9)#3
aaditagrawal merged 35 commits intomainfrom
merge/upstream-main

Conversation

@aaditagrawal
Copy link
Copy Markdown
Owner

@aaditagrawal aaditagrawal commented Mar 9, 2026

Summary

  • Merges 34 upstream commits from pingdotgg/t3code:main into our fork
  • Resolves 16 merge conflicts across server orchestration, web components, contracts, desktop, and CI/docs files
  • Preserves all fork-specific multi-provider support (OpenCode, Copilot, Amp, GeminiCli, Kilo, Claude adapters)
  • Fixes post-merge type errors (duplicate deleteProjectScript declaration, mismatched parentheses in ChatView.tsx)

Upstream changes included

Bug fixes:

Features & UI:

Desktop:

CI/Infra:

Conflict resolution strategy

  • CI/docs files (VOUCHED.td, pr-vouch.yml, CONTRIBUTING.md): Took upstream versions
  • README.md: Merged both — kept fork content, added upstream contributing section
  • Server orchestration/provider: Kept our multi-provider logic, integrated upstream bug fixes (duplicate text prevention, Windows spawn fix)
  • Web components: Kept our provider UI, integrated upstream UX improvements (plan mode overhaul, settings flow, delete project, error dismiss)
  • Contracts: Kept our multi-provider type unions, integrated upstream plan mode schema changes

Test plan

  • bun typecheck passes (all 7 packages)
  • bun lint passes (0 errors, 14 pre-existing warnings)

chuks-qua and others added 30 commits March 8, 2026 15:55
* refactor(contracts): export ProviderStartOptions schema

* feat(contracts): add providerOptions to ThreadTurnStartCommand

* feat(web): send codex binary/home path settings to server

* feat(server): thread providerOptions through to session startup

* fix(contracts): define ProviderStartOptions inline to avoid circular dep

The import from provider.ts caused a ReferenceError at runtime because
of module initialization order in the bundled output.

* fix(server): preserve providerOptions across runtime mode changes and session recovery

Runtime mode toggles and server restarts silently dropped the custom
codex binary/home path, falling back to the default binary. Cache
providerOptions per thread in ProviderCommandReactor and persist it in
the session binding's runtimePayload so recovery can restore it.

Closes pingdotgg#486
- Drop the redundant static bullet before the working status text in `MessagesTimeline`
- Keep the animated dots indicator as the sole working-state visual cue
- Update GitActionsControl quick/menu action text for existing pull requests
- Align unavailable-state copy and tests with the new label
When T3 Code web mode is accessed via HTTPS (e.g. through a reverse proxy
or Tailscale Serve), the WebSocket connection must use wss:// instead of
ws://. Browsers block mixed content — an insecure ws:// connection
initiated from an HTTPS page.

Fix: derive the WebSocket protocol from window.location.protocol.

Co-authored-by: PatrickBauer <patrick@patrickbauer.dev>
* fix: properly emit update metadata for intel macs

* refactor: fix broken parsing of quoted values
…st (pingdotgg#582)

* Add PR template with contribution notice and review checklist

- Add `.github/pull_request_template.md`
- Set expectations that external PRs may not be reviewed or merged
- Require clear change rationale plus UI before/after media when applicable

* Add contribution policy notice and link detailed guidelines

- add CONTRIBUTING.md with clear expectations for external PRs
- update README to direct would-be contributors to CONTRIBUTING.md first
* improvements

* sidebar ui pt2

* back flow

* fix back flow
The thread error banner had no way to be dismissed. Users hitting
unrecoverable errors (e.g. missing gh CLI during PR creation) were
stuck with a persistent error banner and no way to clear it.

Add a dismiss (X) button to ThreadErrorBanner using the existing
AlertAction component, wired to clear the thread error via
setThreadError(id, null).

Closes pingdotgg#496
)

Wire up Electron's context-menu event on webContents to surface
dictionary suggestions for misspelled words. Standard edit actions
(Cut, Copy, Paste, Select All) appear in all context menus.

Related to pingdotgg#473
Adds a delete button to the action edit dialog with a confirmation
alert. Fixes pingdotgg#208.
…tgg#586)

Adjust the Electron sidebar header to properly center the T3 wordmark
with the native window controls. The logo was sitting ~2px too low and
~8px too close to the traffic lights.

- Reduce wordmark container top margin from mt-2 (8px) to mt-1.5 (6px)
- Increase Electron header left padding from 82px to 90px for proper
  traffic light clearance
- Match the desktop update button margin to stay aligned

Closes pingdotgg#564
* fix(scripts): enable shell mode on Windows for .cmd shim resolution

On Windows, tools like `bun`, `npm`, `turbo`, and `bunx` are installed
as `.cmd` shims. Node's `child_process.spawn` cannot resolve these
without `shell: true`, causing `PlatformError: NotFound` on fresh
builds where there is no Turbo cache.

Add `shell: process.platform === "win32"` to all ChildProcess.make
calls in cli.ts, dev-runner.ts, and build-desktop-artifact.ts.

Closes pingdotgg#474

* docs: add comments explaining Windows shell spawn requirement

* docs: add shell spawn comments to remaining call sites
…g#605)

- Ensure the updater publish job checks out the target ref
- Initialize Node using the repository's package.json version file before downloading artifacts
* new plan mode started

* review comments

* more fixes
* Add checkout and Node setup to release updater publish job

- Ensure the updater publish job checks out the target ref
- Initialize Node using the repository's package.json version file before downloading artifacts

* Fix release finalize lockfile refresh
…ent flaky failure (pingdotgg#606)

The terminal RPC test used raw waitForMessage to receive the expected
terminal.event push, but a server.configUpdated push from the
keybindings file watcher can arrive first depending on OS timing.
Replace with the existing waitForPush helper that filters by channel.
* Add PR vouch workflow and trust-status labeling

- Add `.github/workflows/pr-vouch.yml` to label PRs as trusted, unvouched, or denounced
- Add `.github/VOUCHED.td` trust-list file for external contributors
- Document automatic `vouch:*` labels and contributor expectations in `CONTRIBUTING.md`

* Add vouch entries for trusted GitHub contributors

- Append 16 GitHub accounts to `.github/VOUCHED.td`
- Update trusted-voucher list used for PR labeling workflows
…gdotgg#594)

When the persisted state key was bumped from v7 to v8 in 689dda5,
the v7 key was not added to LEGACY_PERSISTED_STATE_KEYS. Users who
ran the app during the ~3-week v7 window retain a stale
`t3code:renderer-state:v7` entry in localStorage that is never
cleaned up.
…ams (pingdotgg#598)

`rawSearch` is already the output of `parseDiffRouteSearch` via the
`useSearch` select transform. The `useMemo` at line 760 re-parsed it
through the same function with an unsafe `as Record<string, unknown>`
cast, producing an identical result. Use `rawSearch` directly instead.
…tgg#607)

Electron derives the userData path from productName in package.json,
which produces directories with spaces and parentheses on all platforms
(e.g. ~/.config/T3 Code (Alpha) on Linux). This is hostile to shell
usage and violates Linux XDG naming conventions.

Override the userData path via app.setPath() before the ready event to
use a clean lowercase name (t3code). If the legacy directory already
exists it is used as-is so existing users keep their Chromium profile
data (localStorage, cookies, sessions, cache).

This follows the same pattern VS Code uses — keeping productName for
display purposes while explicitly setting the data directory path.

Closes pingdotgg#578
t3dotgg and others added 5 commits March 9, 2026 01:20
…indows and linux (pingdotgg#618)

the rail's 16px hit area at z-20 sits right where the native os scrollbar
lives when the sidebar is in offcanvas mode and collapsed. this causes clicks
and drags on the scrollbar to toggle the sidebar instead on windows and linux.

scoping pointer-events-none to [data-collapsible=offcanvas][data-state=collapsed]
fixes the interception without affecting icon mode where the rail needs to stay
clickable.
# Conflicts:
#	.github/VOUCHED.td
#	.github/workflows/pr-vouch.yml
#	CONTRIBUTING.md
#	README.md
#	apps/desktop/src/main.ts
#	apps/server/scripts/cli.ts
#	apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
#	apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
#	apps/server/src/provider/Layers/ProviderService.ts
#	apps/web/src/components/ChatView.tsx
#	apps/web/src/components/GitActionsControl.tsx
#	apps/web/src/components/PlanSidebar.tsx
#	apps/web/src/components/ProjectScriptsControl.tsx
#	apps/web/src/components/Sidebar.tsx
#	packages/contracts/src/orchestration.ts
#	packages/contracts/src/provider.ts
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

📝 Walkthrough

Walkthrough

This PR introduces version 0.0.9 with runtime architecture detection for macOS (Intel/Arm64 translation), desktop update state enhancements, provider options caching in orchestration, web UI warnings for architecture mismatches, a platform-aware download button for marketing, CI workflow additions, contributing guidelines updates, and a domain glossary document.

Changes

Cohort / File(s) Summary
Documentation
.docs/encyclopedia.md, CONTRIBUTING.md, README.md, docs/release.md
Added living domain glossary, revised contribution policy to emphasize small focused changes, added Contributing section to README, clarified macOS auto-update metadata.
Version Bumps
apps/desktop/package.json, apps/server/package.json, apps/web/package.json, packages/contracts/package.json, package.json
Updated version from 0.0.4-alpha.1 to 0.0.9 across desktop, server, web, contracts packages; added release:smoke npm script.
Desktop Runtime Architecture Detection
apps/desktop/src/runtimeArch.ts, apps/desktop/src/runtimeArch.test.ts
New module for detecting cross-architecture scenarios (Intel builds on Arm64 hosts via Rosetta translation) with resolveDesktopRuntimeInfo and isArm64HostRunningIntelBuild utilities.
Desktop Update State & Initialization
apps/desktop/src/updateMachine.ts, apps/desktop/src/updateMachine.test.ts, apps/desktop/src/updateState.test.ts, packages/contracts/src/ipc.ts
Extended DesktopUpdateState with hostArch, appArch, runningUnderArm64Translation; updated createInitialDesktopUpdateState to accept and propagate runtimeInfo; added DesktopRuntimeInfo and DesktopRuntimeArch types.
Desktop Main & Updater
apps/desktop/src/main.ts
Integrated runtime architecture detection at startup, added safe external URL validation, implemented userData path resolution with legacy support, configured differential update behavior based on Arm64-Intel detection, added spelling suggestions to context menu.
Desktop Update Logic & UI Integration
apps/web/src/components/desktopUpdate.logic.ts, apps/web/src/components/desktopUpdate.logic.test.ts
Added shouldShowArm64IntelBuildWarning and getArm64IntelBuildWarningDescription helpers for UI rendering based on architecture state.
Web Sidebar & Warnings
apps/web/src/components/Sidebar.tsx, apps/web/src/components/ui/sidebar.tsx
Integrated Arm64-Intel build warning alert in sidebar, updated WebSocket URL derivation based on protocol, adjusted layout spacing, disabled pointer events for collapsed offcanvas rail.
Web Chat & Components
apps/web/src/components/ChatView.tsx, apps/web/src/components/PlanSidebar.tsx, apps/web/src/components/GitActionsControl.tsx
Added expandedWorkGroups state, propagated providerOptions into dispatch payloads, enhanced pending user input card with multi-question support and keyboard shortcuts, simplified diff detection, removed PlanModePanel, refactored timeout management in sidebar.
Server Orchestration
apps/server/src/orchestration/Layers/ProviderCommandReactor.ts, apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts, apps/server/src/provider/Layers/ProviderService.ts
Implemented provider options caching per thread, added guard for fallback completion text, refactored persisted runtime payload helpers.
Marketing Download Button
apps/marketing/src/pages/index.astro
Added dynamic, platform-aware download button with platform detection via user agent, per-platform icons (Apple/Windows/Linux), sessionStorage caching, fallback to releases page on error.
CI/Workflow & Trust
.github/workflows/ci.yml, .github/workflows/pr-vouch.yml, .github/VOUCHED.td
Added Release Smoke CI job, expanded pr-vouch trigger events to include converted_to_draft, added trust entry for github:Noojuno.
Build Configuration
apps/web/vite.config.ts
Introduced environment-driven sourcemap configuration (T3CODE_WEB_SOURCEMAP) for build output.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 Hops with glee as versions rise,
Detecting Silicon with architect eyes,
From desktop to web, the warnings align,
Provider options cached, downloads divine!
A rabbit's delight—0.0.9 shines bright! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: merging upstream commits from v0.0.5 to v0.0.9, which is directly reflected in the extensive changeset across multiple packages and files.
Description check ✅ Passed The PR description is comprehensive and well-structured, covering summary, upstream changes, conflict resolution, and test plan aligned with the template.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch merge/upstream-main

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 9, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (1)
apps/web/src/components/GitActionsControl.tsx (1)

386-396: LGTM! Formatting change is correct.

The indentation adjustment properly aligns the ternary branch for the "View PR" action.

Optional: Consider adding user feedback when native API is unavailable.

Unlike the openExistingPr function (lines 215-219), this onClick handler silently returns when readNativeApi() is undefined. For consistency, consider showing an error toast.

🔔 Suggested enhancement for error feedback
                  actionProps: {
                    children: "View PR",
                    onClick: () => {
                      const api = readNativeApi();
-                     if (!api) return;
+                     if (!api) {
+                       toastManager.add({
+                         type: "error",
+                         title: "Link opening is unavailable.",
+                         data: threadToastData,
+                       });
+                       return;
+                     }
                      closeResultToast();
                      void api.shell.openExternal(prUrl);
                    },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/components/GitActionsControl.tsx` around lines 386 - 396, The
onClick handler for "View PR" silently returns when readNativeApi() is
undefined; mirror the behavior in openExistingPr by invoking the same
user-facing error toast before returning so users get feedback. Update the
onClick block that references readNativeApi(), closeResultToast, and
api.shell.openExternal(prUrl) to call the same error-toast logic used in
openExistingPr (copy that error toast call) when api is falsy, then return;
leave the existing closeResultToast and api.shell.openExternal flow unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.docs/encyclopedia.md:
- Around line 1-180: The doc references a non-existent RuntimeReceiptBus.ts in
the Receipt and Checkpoint baseline sections; update the mentions of
"RuntimeReceiptBus.ts" and the [13] reference so the doc is valid by either (A)
removing the broken reference and any inline link to RuntimeReceiptBus.ts, (B)
replacing [13] with an existing file that documents receipts/signals (e.g., a
real service or doc that covers receipts), or (C) keep the Receipt concept but
add a short note that the runtime receipt API is planned/not yet implemented;
update the two places that mention "RuntimeReceiptBus.ts" and the numeric [13]
footnote accordingly (search for the symbols "Receipt", "Quiesced", and
"Checkpoint baseline" to locate the exact spots).

In `@apps/marketing/src/pages/index.astro`:
- Around line 79-84: The code currently hardcodes arch: "arm64" inside the Mac
UA branch (the object returned with os: "mac", label: `Download for macOS`)
which forces Intel Macs to the Apple Silicon asset; change the logic so you only
set the arch property when you can reliably detect CPU architecture from the UA
(e.g., check for /arm|aarch64|Apple Silicon/i) and otherwise omit the arch field
(or set it to null/undefined) so the UI falls back to the generic releases URL;
apply the same change to the other Mac-specific return block referenced in the
review (the second mac branch around lines 100-105) so both branches only
include arch when actually known.

In `@apps/server/src/orchestration/Layers/ProviderCommandReactor.ts`:
- Around line 354-356: The cache currently stores providerOptions only by
threadId (threadProviderOptions.set(input.threadId, input.providerOptions)),
which can replay options for the wrong provider in ensureSessionForThread;
change the cache to be keyed by both threadId and provider (e.g., use a
composite key or a nested Map keyed by threadId then provider) and update all
accesses (both where options are stored from input.providerOptions and where
they are replayed in ensureSessionForThread) to use the (threadId, provider)
key; alternatively, if you prefer clearing behavior, ensure you remove/ignore
the cached entry whenever the provider for a thread changes (compare
input.provider to the cached provider and delete the cached providerOptions
before setting the new one) so provider A’s options are never applied to
provider B.

In `@apps/web/src/components/ChatView.tsx`:
- Around line 1020-1030: providerOptionsForDispatch currently returns undefined
when both settings.codexBinaryPath and settings.codexHomePath are cleared, so
orchestration's ProviderCommandReactor merges and preserves previous codex
paths; change the useMemo (providerOptionsForDispatch) to explicitly send an
empty codex object when both paths are cleared (e.g., return { codex: {} }) so
dispatch includes providerOptions with codex: {} to reset cached values
(alternatively send null providerOptions if orchestration supports replacement),
ensuring ProviderCommandReactor receives an explicit reset instead of omitting
the field.

In `@apps/web/src/components/PlanSidebar.tsx`:
- Around line 191-193: The map callback in activePlan.steps.map uses a
non-unique key `${step.status}:${step.step}`, which can collide when multiple
steps share the same status/text; update the mapping in PlanSidebar (the
activePlan.steps.map(...) render) to use a guaranteed-unique key by including
the index or a unique identifier (e.g., change the map signature to (step, idx)
and set the key to include idx or use step.id if available) so each rendered div
has a stable, unique key.
- Around line 76-77: The setTimeout started in the effect watching planMarkdown
can fire after unmount and call setCopied(false); update the effect in
PlanSidebar to store the timeout id (returned from setTimeout) and return a
cleanup function that clears it (clearTimeout) to avoid state updates on
unmounted components; reference the effect using planMarkdown and the setCopied
state updater so you clear the exact timeout created for that effect.

In `@package.json`:
- Around line 50-53: The package.json contains a duplicate scripts key
"release:smoke" which causes ambiguity; remove the earlier duplicate entry so
only a single "release:smoke": "node scripts/release-smoke.ts" remains in the
"scripts" object. Locate the duplicate "release:smoke" keys in package.json and
delete the first occurrence (the one before "clean" and "sync:vscode-icons"),
leaving the later definition intact. After removing, run a quick lint or
npm/yarn script to validate the manifest.

---

Nitpick comments:
In `@apps/web/src/components/GitActionsControl.tsx`:
- Around line 386-396: The onClick handler for "View PR" silently returns when
readNativeApi() is undefined; mirror the behavior in openExistingPr by invoking
the same user-facing error toast before returning so users get feedback. Update
the onClick block that references readNativeApi(), closeResultToast, and
api.shell.openExternal(prUrl) to call the same error-toast logic used in
openExistingPr (copy that error toast call) when api is falsy, then return;
leave the existing closeResultToast and api.shell.openExternal flow unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b5d4954e-c1e3-4048-8eac-ec375192c8ea

📥 Commits

Reviewing files that changed from the base of the PR and between 2db169f and 1087311.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (31)
  • .docs/encyclopedia.md
  • .github/VOUCHED.td
  • .github/workflows/ci.yml
  • .github/workflows/pr-vouch.yml
  • CONTRIBUTING.md
  • README.md
  • apps/desktop/package.json
  • apps/desktop/src/main.ts
  • apps/desktop/src/runtimeArch.test.ts
  • apps/desktop/src/runtimeArch.ts
  • apps/desktop/src/updateMachine.test.ts
  • apps/desktop/src/updateMachine.ts
  • apps/desktop/src/updateState.test.ts
  • apps/marketing/src/pages/index.astro
  • apps/server/package.json
  • apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
  • apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
  • apps/server/src/provider/Layers/ProviderService.ts
  • apps/web/package.json
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/GitActionsControl.tsx
  • apps/web/src/components/PlanSidebar.tsx
  • apps/web/src/components/Sidebar.tsx
  • apps/web/src/components/desktopUpdate.logic.test.ts
  • apps/web/src/components/desktopUpdate.logic.ts
  • apps/web/src/components/ui/sidebar.tsx
  • apps/web/vite.config.ts
  • docs/release.md
  • package.json
  • packages/contracts/package.json
  • packages/contracts/src/ipc.ts

Comment on lines +1 to +180
# Encyclopedia

This is a living glossary for T3 Code. It explains what common terms mean in this codebase.

## Table of contents

- [Project and workspace](#project-and-workspace)
- [Thread timeline](#thread-timeline)
- [Orchestration](#orchestration)
- [Provider runtime](#provider-runtime)
- [Checkpointing](#checkpointing)

## Concepts

### Project and workspace

#### Project

The top-level workspace record in the app. In [the orchestration contracts][1], a project has a `workspaceRoot`, a title, and one or more threads. See [workspace-layout.md][2].

#### Workspace root

The root filesystem path for a project. In [the orchestration model][1], it is the base directory for branches and optional worktrees. See [workspace-layout.md][2].

#### Worktree

A Git worktree used as an isolated workspace for a thread. If a thread has a `worktreePath` in [the contracts][1], it runs there instead of in the main working tree. Git operations live in [GitCore.ts][3].

### Thread timeline

#### Thread

The main durable unit of conversation and workspace history. In [the orchestration contracts][1], a thread holds messages, activities, checkpoints, and session-related state. See [projector.ts][4].

#### Turn

A single user-to-assistant work cycle inside a thread. It starts with user input and ends when follow-up work like checkpointing settles. See [the contracts][1], [ProviderRuntimeIngestion.ts][5], and [CheckpointReactor.ts][6].

#### Activity

A user-visible log item attached to a thread. In [the contracts][1], activities cover important non-message events like approvals, tool actions, and failures. They are projected into thread state in [projector.ts][4].

### Orchestration

Orchestration is the server-side domain layer that turns runtime activity into stable app state. The main entry point is [OrchestrationEngine.ts][7], with core logic in [decider.ts][8] and [projector.ts][4].

#### Aggregate

The domain object a command or event belongs to. In [the contracts][1], that is usually `project` or `thread`. See [decider.ts][8].

#### Command

A typed request to change domain state. In [the contracts][1], commands are validated in [commandInvariants.ts][9] and turned into events by [decider.ts][8].
Examples include `thread.create`, `thread.turn.start`, and `thread.checkpoint.revert`.

#### Domain Event

A persisted fact that something already happened. In [the contracts][1], events are the source of truth, and [projector.ts][4] shows how they are applied.
Examples include `thread.created`, `thread.message-sent`, and `thread.turn-diff-completed`.

#### Decider

The pure orchestration logic that turns commands plus current state into events. The core implementation is in [decider.ts][8], with preconditions in [commandInvariants.ts][9].

#### Projection

A read-optimized view derived from events. See [projector.ts][4], [ProjectionPipeline.ts][11], and [ProjectionSnapshotQuery.ts][10].

#### Projector

The logic that applies domain events to the read model or projection tables. See [projector.ts][4] and [ProjectionPipeline.ts][11].

#### Read model

The current materialized view of orchestration state. In [the contracts][1], it holds projects, threads, messages, activities, checkpoints, and session state. See [ProjectionSnapshotQuery.ts][10] and [OrchestrationEngine.ts][7].

#### Reactor

A side-effecting service that handles follow-up work after events or runtime signals. Examples include [CheckpointReactor.ts][6], [ProviderCommandReactor.ts][12], and [ProviderRuntimeIngestion.ts][5].

#### Receipt

A lightweight typed runtime signal emitted when an async milestone completes. See [RuntimeReceiptBus.ts][13].
Examples include `checkpoint.baseline.captured`, `checkpoint.diff.finalized`, and `turn.processing.quiesced`, which are emitted by flows such as [CheckpointReactor.ts][6].

#### Quiesced

"Quiesced" means a turn has gone quiet and stable. In [the receipt schema][13], it means the follow-up work has settled, including work in [CheckpointReactor.ts][6].

### Provider runtime

The live backend agent implementation and its event stream. The main service is [ProviderService.ts][14], the adapter contract is [ProviderAdapter.ts][15], and the overview is in [provider-architecture.md][16].

#### Provider

The backend agent runtime that actually performs work. See [ProviderService.ts][14], [ProviderAdapter.ts][15], and [CodexAdapter.ts][17].

#### Session

The live provider-backed runtime attached to a thread. Session shape is in [the orchestration contracts][1], and lifecycle is managed in [ProviderService.ts][14].

#### Runtime mode

The safety/access mode for a thread or session. In [the contracts][1], the main values are `approval-required` and `full-access`. See [runtime-modes.md][18].

#### Interaction mode

The agent interaction style for a thread. In [the contracts][1], the main values are `default` and `plan`. See [runtime-modes.md][18].

#### Assistant delivery mode

Controls how assistant text reaches the thread timeline. In [the contracts][1], `streaming` updates incrementally and `buffered` delivers a completed result. See [ProviderService.ts][14].

#### Snapshot

A point-in-time view of state. The word is used in multiple layers, including orchestration, provider, and checkpointing. See [ProjectionSnapshotQuery.ts][10], [ProviderAdapter.ts][15], and [CheckpointStore.ts][19].

### Checkpointing

Checkpointing captures workspace state over time so the app can diff turns and restore earlier points. The main pieces are [CheckpointStore.ts][19], [CheckpointDiffQuery.ts][20], and [CheckpointReactor.ts][6].

#### Checkpoint

A saved snapshot of a thread workspace at a particular turn. In practice it is a hidden Git ref in [CheckpointStore.ts][19] plus a projected summary from [ProjectionCheckpoints.ts][21]. Capture and lifecycle work happen in [CheckpointReactor.ts][6].

#### Checkpoint ref

The durable identifier for a filesystem checkpoint, stored as a Git ref. It is typed in [the contracts][1], constructed in [Utils.ts][22], and used by [CheckpointStore.ts][19].

#### Checkpoint baseline

The starting checkpoint for diffing a thread timeline. This flow is surfaced through [RuntimeReceiptBus.ts][13], coordinated in [CheckpointReactor.ts][6], and supported by [Utils.ts][22].

#### Checkpoint diff

The patch difference between two checkpoints. Query logic lives in [CheckpointDiffQuery.ts][20], diff parsing lives in [Diffs.ts][23], and finalization is coordinated by [CheckpointReactor.ts][6].

#### Turn diff

The file patch and changed-file summary for one turn. It is usually computed in [CheckpointDiffQuery.ts][20], represented in [the contracts][1], and recorded into thread state by [projector.ts][4].

## Practical Shortcuts

- If you see `requested`, think "intent recorded".
- If you see `completed`, think "result applied".
- If you see `receipt`, think "async milestone signal".
- If you see `checkpoint`, think "workspace snapshot for diff/restore".
- If you see `quiesced`, think "all relevant follow-up work has gone idle".

## Related Docs

- [architecture.md][24]
- [provider-architecture.md][16]
- [runtime-modes.md][18]
- [workspace-layout.md][2]

[1]: ../packages/contracts/src/orchestration.ts
[2]: ./workspace-layout.md
[3]: ../apps/server/src/git/Layers/GitCore.ts
[4]: ../apps/server/src/orchestration/projector.ts
[5]: ../apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
[6]: ../apps/server/src/orchestration/Layers/CheckpointReactor.ts
[7]: ../apps/server/src/orchestration/Layers/OrchestrationEngine.ts
[8]: ../apps/server/src/orchestration/decider.ts
[9]: ../apps/server/src/orchestration/commandInvariants.ts
[10]: ../apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts
[11]: ../apps/server/src/orchestration/Layers/ProjectionPipeline.ts
[12]: ../apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
[13]: ../apps/server/src/orchestration/Services/RuntimeReceiptBus.ts
[14]: ../apps/server/src/provider/Layers/ProviderService.ts
[15]: ../apps/server/src/provider/Services/ProviderAdapter.ts
[16]: ./provider-architecture.md
[17]: ../apps/server/src/provider/Layers/CodexAdapter.ts
[18]: ./runtime-modes.md
[19]: ../apps/server/src/checkpointing/Services/CheckpointStore.ts
[20]: ../apps/server/src/checkpointing/Services/CheckpointDiffQuery.ts
[21]: ../apps/server/src/persistence/Services/ProjectionCheckpoints.ts
[22]: ../apps/server/src/checkpointing/Utils.ts
[23]: ../apps/server/src/checkpointing/Diffs.ts
[24]: ./architecture.md
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that key referenced files exist
files=(
  "packages/contracts/src/orchestration.ts"
  "apps/server/src/orchestration/projector.ts"
  "apps/server/src/orchestration/decider.ts"
  "apps/server/src/provider/Layers/ProviderService.ts"
  "apps/server/src/checkpointing/Services/CheckpointStore.ts"
)

for file in "${files[@]}"; do
  if [ -f "$file" ]; then
    echo "$file exists"
  else
    echo "$file NOT FOUND"
  fi
done

Repository: aaditagrawal/t3code

Length of output: 340


🏁 Script executed:

#!/bin/bash
# Verify all 24 references from the encyclopedia.md file
# References are relative to repo root (need to resolve relative paths)

declare -A refs=(
  [1]="packages/contracts/src/orchestration.ts"
  [2]="docs/workspace-layout.md"
  [3]="apps/server/src/git/Layers/GitCore.ts"
  [4]="apps/server/src/orchestration/projector.ts"
  [5]="apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts"
  [6]="apps/server/src/orchestration/Layers/CheckpointReactor.ts"
  [7]="apps/server/src/orchestration/Layers/OrchestrationEngine.ts"
  [8]="apps/server/src/orchestration/decider.ts"
  [9]="apps/server/src/orchestration/commandInvariants.ts"
  [10]="apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts"
  [11]="apps/server/src/orchestration/Layers/ProjectionPipeline.ts"
  [12]="apps/server/src/orchestration/Layers/ProviderCommandReactor.ts"
  [13]="apps/server/src/orchestration/Services/RuntimeReceiptBus.ts"
  [14]="apps/server/src/provider/Layers/ProviderService.ts"
  [15]="apps/server/src/provider/Services/ProviderAdapter.ts"
  [16]="docs/provider-architecture.md"
  [17]="apps/server/src/provider/Layers/CodexAdapter.ts"
  [18]="docs/runtime-modes.md"
  [19]="apps/server/src/checkpointing/Services/CheckpointStore.ts"
  [20]="apps/server/src/checkpointing/Services/CheckpointDiffQuery.ts"
  [21]="apps/server/src/persistence/Services/ProjectionCheckpoints.ts"
  [22]="apps/server/src/checkpointing/Utils.ts"
  [23]="apps/server/src/checkpointing/Diffs.ts"
  [24]="docs/architecture.md"
)

missing=0
for ref in "${!refs[@]}"; do
  path="${refs[$ref]}"
  if [ -f "$path" ]; then
    echo "✓ [$ref] $path"
  else
    echo "✗ [$ref] $path NOT FOUND"
    ((missing++))
  fi
done

echo ""
echo "Summary: $(( 24 - missing ))/24 files found"
if [ $missing -gt 0 ]; then
  echo "Missing: $missing files"
fi

Repository: aaditagrawal/t3code

Length of output: 1468


🏁 Script executed:

#!/bin/bash
# Check if missing docs files exist in .docs directory
docs_files=(
  ".docs/workspace-layout.md"
  ".docs/provider-architecture.md"
  ".docs/runtime-modes.md"
  ".docs/architecture.md"
)

echo "Checking .docs directory:"
for file in "${docs_files[@]}"; do
  if [ -f "$file" ]; then
    echo "$file exists"
  else
    echo "$file NOT FOUND"
  fi
done

# Also check for RuntimeReceiptBus in different locations
echo ""
echo "Searching for RuntimeReceiptBus:"
find . -name "*RuntimeReceiptBus*" -type f 2>/dev/null | head -10

Repository: aaditagrawal/t3code

Length of output: 260


🏁 Script executed:

#!/bin/bash
# More comprehensive search for RuntimeReceiptBus
echo "Searching for RuntimeReceiptBus in entire codebase:"
rg -l "RuntimeReceiptBus" --type ts --type tsx 2>/dev/null

echo ""
echo "Checking if Services directory exists in orchestration:"
ls -la apps/server/src/orchestration/Services/ 2>/dev/null || echo "Services directory not found"

echo ""
echo "Listing all files in orchestration directory:"
find apps/server/src/orchestration -type f -name "*.ts" | head -20

Repository: aaditagrawal/t3code

Length of output: 2066


🏁 Script executed:

#!/bin/bash
# Search for Receipt-related code
echo "Searching for Receipt concept in code:"
rg -i "receipt" --type ts --type tsx -l apps/server/src/orchestration/ 2>/dev/null | head -10

echo ""
echo "Checking reference context in encyclopedia:"
grep -n "RuntimeReceiptBus\|Receipt" .docs/encyclopedia.md | head -10

Repository: aaditagrawal/t3code

Length of output: 540


Remove or fix broken references to non-existent RuntimeReceiptBus.ts.

The documentation references RuntimeReceiptBus.ts [13] in the Receipt definition (line 83) and Checkpoint baseline section (line 132), but this file does not exist in the codebase. Either remove these references, replace them with an existing file that covers the Receipt/runtime signal concept, or add a note indicating the Receipt concept is planned but not yet implemented.

🧰 Tools
🪛 LanguageTool

[style] ~146-~146: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... completed, think "result applied". - If you see receipt, think "async milesto...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~147-~147: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ipt, think "async milestone signal". - If you see checkpoint`, think "workspace ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~148-~148: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...workspace snapshot for diff/restore". - If you see quiesced, think "all relevant...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.docs/encyclopedia.md around lines 1 - 180, The doc references a
non-existent RuntimeReceiptBus.ts in the Receipt and Checkpoint baseline
sections; update the mentions of "RuntimeReceiptBus.ts" and the [13] reference
so the doc is valid by either (A) removing the broken reference and any inline
link to RuntimeReceiptBus.ts, (B) replacing [13] with an existing file that
documents receipts/signals (e.g., a real service or doc that covers receipts),
or (C) keep the Receipt concept but add a short note that the runtime receipt
API is planned/not yet implemented; update the two places that mention
"RuntimeReceiptBus.ts" and the numeric [13] footnote accordingly (search for the
symbols "Receipt", "Quiesced", and "Checkpoint baseline" to locate the exact
spots).

Comment on lines +79 to +84
if (/Mac/i.test(ua)) {
return {
os: "mac",
label: `Download for macOS`,
arch: "arm64",
};
Copy link
Copy Markdown

@coderabbitai coderabbitai bot Mar 9, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Don't force every macOS user onto the ARM build.

Line 83 hardcodes arch: "arm64", so Intel Macs will prefer the Apple Silicon .dmg whenever both variants exist. That breaks the primary download path for those users. Only choose an arch-specific asset when the arch is actually known; otherwise keep the button on the generic releases URL.

Suggested fix
-type Platform = { os: "mac" | "win" | "linux"; label: string; arch?: string };
+type Platform = {
+  os: "mac" | "win" | "linux";
+  label: string;
+  arch?: "arm64" | "x64";
+};

   if (/Mac/i.test(ua)) {
     return {
       os: "mac",
       label: `Download for macOS`,
-      arch: "arm64",
     };
   }

   if (platform.os === "mac") {
-    const preferred = assets.find((a) =>
-      a.name.endsWith(`-${platform.arch}.dmg`),
-    );
-    const fallback = assets.find((a) => a.name.endsWith(".dmg"));
-    return (preferred ?? fallback)?.browser_download_url ?? null;
+    if (platform.arch) {
+      const preferred = assets.find((a) =>
+        a.name.endsWith(`-${platform.arch}.dmg`),
+      );
+      if (preferred) return preferred.browser_download_url;
+    }
+    return null;
   }

Also applies to: 100-105

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/marketing/src/pages/index.astro` around lines 79 - 84, The code
currently hardcodes arch: "arm64" inside the Mac UA branch (the object returned
with os: "mac", label: `Download for macOS`) which forces Intel Macs to the
Apple Silicon asset; change the logic so you only set the arch property when you
can reliably detect CPU architecture from the UA (e.g., check for
/arm|aarch64|Apple Silicon/i) and otherwise omit the arch field (or set it to
null/undefined) so the UI falls back to the generic releases URL; apply the same
change to the other Mac-specific return block referenced in the review (the
second mac branch around lines 100-105) so both branches only include arch when
actually known.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

No Intel support.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@aaditagrawal, understood — if Intel Macs are an explicitly unsupported platform, then hardcoding arch: "arm64" for all macOS users is the correct and intentional behaviour. My concern doesn't apply here. Thanks for clarifying!


✏️ Learnings added
Learnt from: aaditagrawal
Repo: aaditagrawal/t3code PR: 3
File: apps/marketing/src/pages/index.astro:79-84
Timestamp: 2026-03-09T11:52:16.574Z
Learning: In `apps/marketing/src/pages/index.astro` (repository: aaditagrawal/t3code), hardcoding `arch: "arm64"` for all macOS download targets is intentional — Intel Macs are not a supported platform for T3 Code. Do not flag this as a bug in future reviews.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Comment on lines +354 to +356
if (input.providerOptions !== undefined) {
threadProviderOptions.set(input.threadId, input.providerOptions);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Scope cached providerOptions by provider, not just by thread.

Lines 354-356 cache the last providerOptions under threadId alone, and Lines 716-719 later replay that cache on session restarts. If a thread switches from provider A to provider B without sending a fresh providerOptions, ensureSessionForThread can restart B with A’s cached start options. That can misconfigure the adapter or fail session startup.

Please either key this cache by (threadId, provider) or clear/ignore the cached entry whenever the target provider changes.

Also applies to: 716-719

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server/src/orchestration/Layers/ProviderCommandReactor.ts` around lines
354 - 356, The cache currently stores providerOptions only by threadId
(threadProviderOptions.set(input.threadId, input.providerOptions)), which can
replay options for the wrong provider in ensureSessionForThread; change the
cache to be keyed by both threadId and provider (e.g., use a composite key or a
nested Map keyed by threadId then provider) and update all accesses (both where
options are stored from input.providerOptions and where they are replayed in
ensureSessionForThread) to use the (threadId, provider) key; alternatively, if
you prefer clearing behavior, ensure you remove/ignore the cached entry whenever
the provider for a thread changes (compare input.provider to the cached provider
and delete the cached providerOptions before setting the new one) so provider
A’s options are never applied to provider B.

Comment on lines +1020 to +1030
const providerOptionsForDispatch = useMemo(() => {
if (!settings.codexBinaryPath && !settings.codexHomePath) {
return undefined;
}
return {
codex: {
...(settings.codexBinaryPath ? { binaryPath: settings.codexBinaryPath } : {}),
...(settings.codexHomePath ? { homePath: settings.codexHomePath } : {}),
},
};
}, [settings.codexBinaryPath, settings.codexHomePath]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== providerOptions definitions/usages ==="
rg -n -C4 '\bproviderOptions\b|\bcachedProviderOptions\b|\bproviderOptionsCache\b' \
  --glob '!**/node_modules/**' --glob '!**/dist/**'

echo
echo "=== thread.turn.start handlers ==="
rg -n -C5 'thread\.turn\.start' \
  --glob '!**/node_modules/**' --glob '!**/dist/**'

Repository: aaditagrawal/t3code

Length of output: 50375


🏁 Script executed:

#!/bin/bash

echo "=== Inspecting dispatch payload construction at lines 2920-2935 ==="
sed -n '2920,2935p' apps/web/src/components/ChatView.tsx

echo -e "\n=== Inspecting dispatch payload construction at lines 3210-3225 ==="
sed -n '3210,3225p' apps/web/src/components/ChatView.tsx

echo -e "\n=== Inspecting dispatch payload construction at lines 3325-3340 ==="
sed -n '3325,3340p' apps/web/src/components/ChatView.tsx

echo -e "\n=== Verifying cache replacement logic in ProviderCommandReactor ==="
sed -n '240,245p' apps/server/src/orchestration/Layers/ProviderCommandReactor.ts

echo -e "\n=== Verifying cache is set only when providerOptions is defined ==="
sed -n '354,356p' apps/server/src/orchestration/Layers/ProviderCommandReactor.ts

Repository: aaditagrawal/t3code

Length of output: 2554


Send an explicit clear signal for Codex path overrides, or have orchestration replace rather than merge cached provider options.

Lines 1020-1030 build providerOptions only when settings have values, returning undefined when both are cleared. The conditional spread at Lines 2926-2928, 3214-3216, and 3329-3331 omits the field entirely when providerOptionsForDispatch is falsy. Because orchestration's ProviderCommandReactor caches provider options and only updates the cache when a non-undefined providerOptions field is received, cleared Codex paths stick around and replay in subsequent turns. Fix by sending an explicit reset payload (e.g., { providerOptions: { codex: {} } } or null), or have the server replace rather than merge cached options per dispatch.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/components/ChatView.tsx` around lines 1020 - 1030,
providerOptionsForDispatch currently returns undefined when both
settings.codexBinaryPath and settings.codexHomePath are cleared, so
orchestration's ProviderCommandReactor merges and preserves previous codex
paths; change the useMemo (providerOptionsForDispatch) to explicitly send an
empty codex object when both paths are cleared (e.g., return { codex: {} }) so
dispatch includes providerOptions with codex: {} to reset cached values
(alternatively send null providerOptions if orchestration supports replacement),
ensuring ProviderCommandReactor receives an explicit reset instead of omitting
the field.

Comment on lines +76 to 77
setTimeout(() => setCopied(false), 2000);
}, [planMarkdown]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Potential state update on unmounted component.

The setTimeout callback may fire after the component unmounts, attempting to call setCopied(false) on an unmounted component. While React 18+ handles this more gracefully, it's cleaner to clear the timeout on unmount.

🛠️ Proposed fix using useEffect cleanup
+import { memo, useState, useCallback, useEffect, useRef } from "react";
-import { memo, useState, useCallback } from "react";
...
   const [copied, setCopied] = useState(false);
+  const copiedTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
+
+  useEffect(() => {
+    return () => {
+      if (copiedTimeoutRef.current) clearTimeout(copiedTimeoutRef.current);
+    };
+  }, []);

   const handleCopyPlan = useCallback(() => {
     if (!planMarkdown) return;
     void navigator.clipboard.writeText(planMarkdown);
     setCopied(true);
-    setTimeout(() => setCopied(false), 2000);
+    if (copiedTimeoutRef.current) clearTimeout(copiedTimeoutRef.current);
+    copiedTimeoutRef.current = setTimeout(() => setCopied(false), 2000);
   }, [planMarkdown]);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/components/PlanSidebar.tsx` around lines 76 - 77, The setTimeout
started in the effect watching planMarkdown can fire after unmount and call
setCopied(false); update the effect in PlanSidebar to store the timeout id
(returned from setTimeout) and return a cleanup function that clears it
(clearTimeout) to avoid state updates on unmounted components; reference the
effect using planMarkdown and the setCopied state updater so you clear the exact
timeout created for that effect.

Comment on lines +191 to +193
{activePlan.steps.map((step) => (
<div
key={`step-${index}`}
key={`${step.status}:${step.step}`}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Key collision risk if steps have duplicate text.

Using ${step.status}:${step.step} as a key can cause collisions when multiple steps share the same status and text content. Consider including the index to guarantee uniqueness.

🛠️ Proposed fix
-              {activePlan.steps.map((step) => (
+              {activePlan.steps.map((step, index) => (
                 <div
-                  key={`${step.status}:${step.step}`}
+                  key={`${index}:${step.status}:${step.step}`}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{activePlan.steps.map((step) => (
<div
key={`step-${index}`}
key={`${step.status}:${step.step}`}
{activePlan.steps.map((step, index) => (
<div
key={`${index}:${step.status}:${step.step}`}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/components/PlanSidebar.tsx` around lines 191 - 193, The map
callback in activePlan.steps.map uses a non-unique key
`${step.status}:${step.step}`, which can collide when multiple steps share the
same status/text; update the mapping in PlanSidebar (the
activePlan.steps.map(...) render) to use a guaranteed-unique key by including
the index or a unique identifier (e.g., change the map signature to (step, idx)
and set the key to include idx or use step.id if available) so each rendered div
has a stable, unique key.

Comment on lines +50 to 53
"release:smoke": "node scripts/release-smoke.ts",
"clean": "rm -rf node_modules apps/*/node_modules packages/*/node_modules apps/*/dist apps/*/dist-electron packages/*/dist .turbo apps/*/.turbo packages/*/.turbo",
"sync:vscode-icons": "node scripts/sync-vscode-icons.mjs",
"release:smoke": "node scripts/release-smoke.ts"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that `package.json` declares `release:smoke` only once.
rg -n '"release:smoke"\s*:' package.json

Repository: aaditagrawal/t3code

Length of output: 175


Remove the duplicate release:smoke script key.

The release:smoke key appears on both line 50 and line 53 in package.json. Duplicate keys create manifest ambiguity and will fail linting. Remove the entry at line 50.

Proposed fix
     "dist:desktop:linux": "node scripts/build-desktop-artifact.ts --platform linux --target AppImage --arch x64",
     "dist:desktop:win": "node scripts/build-desktop-artifact.ts --platform win --target nsis --arch x64",
-    "release:smoke": "node scripts/release-smoke.ts",
     "clean": "rm -rf node_modules apps/*/node_modules packages/*/node_modules apps/*/dist apps/*/dist-electron packages/*/dist .turbo apps/*/.turbo packages/*/.turbo",
     "sync:vscode-icons": "node scripts/sync-vscode-icons.mjs",
     "release:smoke": "node scripts/release-smoke.ts"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"release:smoke": "node scripts/release-smoke.ts",
"clean": "rm -rf node_modules apps/*/node_modules packages/*/node_modules apps/*/dist apps/*/dist-electron packages/*/dist .turbo apps/*/.turbo packages/*/.turbo",
"sync:vscode-icons": "node scripts/sync-vscode-icons.mjs",
"release:smoke": "node scripts/release-smoke.ts"
"clean": "rm -rf node_modules apps/*/node_modules packages/*/node_modules apps/*/dist apps/*/dist-electron packages/*/dist .turbo apps/*/.turbo packages/*/.turbo",
"sync:vscode-icons": "node scripts/sync-vscode-icons.mjs",
"release:smoke": "node scripts/release-smoke.ts"
🧰 Tools
🪛 Biome (2.4.4)

[error] 50-50: The key release:smoke was already declared.

(lint/suspicious/noDuplicateObjectKeys)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 50 - 53, The package.json contains a duplicate
scripts key "release:smoke" which causes ambiguity; remove the earlier duplicate
entry so only a single "release:smoke": "node scripts/release-smoke.ts" remains
in the "scripts" object. Locate the duplicate "release:smoke" keys in
package.json and delete the first occurrence (the one before "clean" and
"sync:vscode-icons"), leaving the later definition intact. After removing, run a
quick lint or npm/yarn script to validate the manifest.

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

Labels

vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.