Skip to content

Commit 6886f45

Browse files
committed
fix(web): preserve PR scroll ownership with latest layouts
2 parents 3d48f42 + a4c9494 commit 6886f45

14,695 files changed

Lines changed: 1717106 additions & 477855 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/contribution-triage/SKILL.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ trusted policy and reassess changed submission evidence; neither example grants
109109

110110
## Apply the outcome
111111

112+
Do not automatically close a PR if a maintainer in the trusted `TRIAGE_EXEMPTIONS.td` list has
113+
commented or submitted a review, including on earlier heads, or if `triage:keep-open` is present.
114+
Leave protected PRs open for maintainer decision. This does not grant an author exemption,
115+
eligibility, or review approval.
116+
112117
In enforcement mode, execute the applicable outcome within the established scope, using the state and
113118
retry safeguards below. In a dry run or without the required authority, prepare the same action and
114119
comment text but do not write to GitHub. Keep the eligibility finding separate from action completion.

‎.agents/skills/test-t3-app/references/sqlite-fixtures.md‎

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Load this reference only when inspecting or seeding local T3 state directly.
44

55
## Select the correct database
66

7-
When `--base-dir` or `--home-dir` is explicit, runtime state lives under `<base-dir>/userdata` and the database path is `<base-dir>/userdata/state.sqlite`. The `<base-dir>/dev` state directory is only the fallback for an implicit development home, preventing an ordinary `vp run dev` from touching production state.
7+
When `--base-dir` or `--home-dir` is explicit, runtime state lives under `<base-dir>/userdata` and the database path is `<base-dir>/userdata/statev2.sqlite`. The `<base-dir>/dev` state directory is only the fallback for an implicit development home, preventing an ordinary `vp run dev` from touching production state.
8+
9+
The server copies the V1 `state.sqlite` into `statev2.sqlite` only when `statev2.sqlite` is missing. After the first start, edits to `state.sqlite` change nothing.
810

911
Start the target runtime once before seeding so all migrations have run. Use an isolated base directory. Stop the server before writes to avoid racing application state or an active projection.
1012

@@ -23,7 +25,7 @@ Inspect current columns before writing a fixture:
2325
```bash
2426
node apps/server/scripts/t3-sqlite-state.ts query \
2527
--base-dir <base-dir> \
26-
--sql "PRAGMA table_info(projection_threads)"
28+
--sql "PRAGMA table_info(orchestration_v2_projection_threads)"
2729
```
2830

2931
Apply a SQL fixture from a file:
@@ -38,21 +40,10 @@ Use one statement per invocation for both `query` and `exec`; the helper wraps w
3840

3941
## Seed projection data carefully
4042

41-
The web UI primarily reads these projection tables:
42-
43-
- `projection_projects`
44-
- `projection_threads`
45-
- `projection_thread_messages`
46-
- `projection_thread_activities`
47-
- `projection_thread_sessions`
48-
- `projection_turns`
49-
- `projection_pending_approvals`
50-
- `projection_thread_proposed_plans`
51-
52-
Inspect `PRAGMA table_info(<table>)` and the current migrations under `apps/server/src/persistence/Migrations/` before constructing inserts. Keep identifiers unique, timestamps as ISO strings, JSON columns valid, and related project/thread/turn IDs consistent.
43+
Clients read projects from `projection_projects` and everything else from the `orchestration_v2_projection_*` tables: threads, runs, messages, turn items, runtime requests, plans, and provider sessions. The older `projection_thread*` tables hold V1 history, which the server imports once per thread at startup; later edits there do not reach the UI.
5344

54-
For a substantial current example, inspect `seedDatabase` in `scripts/mobile-showcase-environment.ts`. Adapt its column set to the target database instead of assuming copied SQL remains current.
45+
Most V2 rows carry a `payload_json` that must decode against the schemas in `packages/contracts/src/orchestrationV2.ts`. The safest start is a row the app wrote itself: create a thread through the UI, copy its rows, and edit them. Keep identifiers unique, timestamps as ISO strings, and related project, thread, and run IDs consistent.
5546

56-
Direct projection writes are appropriate for ephemeral visual states, edge-case counts, long titles, activity lists, and similar UI fixtures. They do not create a coherent orchestration event history. Do not modify `orchestration_events` unless the test specifically exercises projector internals, and do not use direct projection writes to claim backend business behavior works.
47+
Direct projection writes are appropriate for ephemeral visual states, edge-case counts, long titles, long timelines, and similar UI fixtures. They do not create a coherent event history. Leave the event log (`orchestration_events`) unchanged, and do not use direct projection writes to claim backend business behavior works.
5748

5849
Use the app's commands or APIs for behavior tests. Use `node apps/server/src/bin.ts auth ...` for auth state rather than editing `auth_pairing_links` or `auth_sessions`.

‎.coderabbit.config.ts‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { defineConfig, type CodeRabbitContext } from "@coderabbitai/config";
2+
3+
// Org members and collaborators merge their own pull requests. On anyone else's, CodeRabbit
4+
// requests changes until its comments are resolved, then approves.
5+
const UNGATED_AUTHORS = new Set(["OWNER", "MEMBER", "COLLABORATOR"]);
6+
const isGated = ({ pr }: CodeRabbitContext) => !UNGATED_AUTHORS.has(pr?.authorAssociation ?? "");
7+
8+
export default defineConfig((ctx) => ({
9+
reviews: {
10+
high_level_summary: false,
11+
review_status: false,
12+
request_changes_workflow: isGated(ctx),
13+
allow_author_approval: !isGated(ctx),
14+
auto_review: {
15+
enabled: true,
16+
},
17+
pre_merge_checks: {
18+
docstrings: { mode: "off" },
19+
override_requested_reviewers_only: isGated(ctx),
20+
},
21+
path_filters: [
22+
// Vendored read-only reference checkouts of upstream Effect and Alchemy
23+
// (see scripts/lib/reference-repos.ts). Nothing imports from them.
24+
"!.repos/**",
25+
],
26+
path_instructions: [
27+
{
28+
path: "{apps,packages,infra}/**/*.ts",
29+
instructions: "Hold changed code to the rules in docs/internals/effect-services.md.",
30+
},
31+
{
32+
path: "apps/web/src/**/*.{tsx,css}",
33+
instructions: "Hold changed code to the rules in docs/internals/web-ui.md.",
34+
},
35+
],
36+
},
37+
knowledge_base: {
38+
code_guidelines: {
39+
filePatterns: [
40+
{ files: "docs/internals/effect-services.md", applyTo: "{apps,packages,infra}/**/*.ts" },
41+
{ files: "docs/internals/web-ui.md", applyTo: "apps/web/src/**/*.{tsx,css}" },
42+
],
43+
},
44+
},
45+
}));

‎.coderabbit.yaml‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎.cursor/rules/cursor-cloud.mdc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ Gradle auto-downloads any additional pinned SDK packages on demand.
6969
## Known flaky tests (unrelated to setup)
7070

7171
- `apps/server/src/git/GitManager.test.ts` (cross-repo PR metadata, can time out at 12s).
72-
- `apps/server/src/provider/Layers/ProviderRegistry.test.ts` (codex binaryPath re-probe ordering).
72+
- `apps/server/src/provider/ProviderRegistry.test.ts` (codex binaryPath re-probe ordering).

‎.github/TRIAGE_EXEMPTIONS.td‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Explicit contribution-triage exemptions; independent of VOUCHED.td.
22
# Syntax: github:username (one entry per line; no denouncements).
33
# Keep entries sorted alphabetically. Only the trusted upstream main copy applies.
4+
github:bmdavis419
45
github:juliusmarminge
56
github:maria-rcks
7+
github:markflorkowski
68
github:t3dotgg
9+
github:Yash-Singh1

‎.github/VOUCHED.td‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ github:cursoragent
2525
github:D3OXY
2626
github:dbalders
2727
github:eggfriedrice24
28+
github:esthor
2829
github:extoci
2930
github:f-trycua
3031
github:flamboh

‎.github/workflows/ci.yml‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,16 @@ jobs:
148148
!/.repos/
149149
sparse-checkout-cone-mode: false
150150

151+
# Blacksmith boots GitHub's Ubuntu runner image (gcc is usually present),
152+
# but ACP process-tree live tests compile a small pthread fixture with `cc`
153+
# and soft-skip when it is missing. Install build-essential so that path
154+
# always runs in CI instead of silently no-oping.
155+
- name: Install C toolchain for process-tree fixtures
156+
run: |
157+
sudo apt-get update
158+
sudo apt-get install -y --no-install-recommends build-essential
159+
command -v cc
160+
151161
- uses: ./.github/actions/setup-apt-mirrors
152162

153163
# The desktop tests compile the browser secret helper. The install runs in
@@ -245,13 +255,16 @@ jobs:
245255
# No Electron setup here: `t3` (apps/server) has no Electron dependency
246256
# and none of its tests touch the runtime. Only the non-server `test`
247257
# job, which covers @t3tools/desktop, needs the download.
258+
- name: Install Chromium for server browser integration tests
259+
run: node apps/server/node_modules/playwright-core/cli.js install --with-deps --only-shell chromium
260+
248261
- name: Test
249262
env:
250263
T3CODE_TRANSFER_BUDGET_REPORT_PATH: ${{ runner.temp }}/t3code-transfer-budget.md
251264
T3CODE_TRANSFER_BUDGET_RESULT_PATH: ${{ runner.temp }}/thread-transfer-result.json
252265
run: vp run --filter t3 test --shard ${{ matrix.shard }}/${{ strategy.job-total }}
253266

254-
# src/server.test.ts writes the budget report, so exactly one shard
267+
# integration/transferBudgetV2.integration.test.ts writes the report; exactly one shard
255268
# produces these files. Gating the upload on their presence keeps a
256269
# single `thread-transfer-results` artifact per run, which is the name
257270
# thread-transfer-report.yml resolves.
@@ -283,6 +296,21 @@ jobs:
283296
if-no-files-found: ignore
284297
retention-days: 30
285298

299+
transfer-report:
300+
name: Transfer report artifact
301+
needs: test_server
302+
# On Blacksmith like every other job here: the GitHub-hosted queue is shared
303+
# with the PR bots and can leave this job waiting until it is abandoned,
304+
# which fails `Check` on an otherwise green run.
305+
runs-on: blacksmith-2vcpu-ubuntu-2404
306+
timeout-minutes: 5
307+
steps:
308+
- name: Require transfer measurements
309+
uses: actions/download-artifact@v8
310+
with:
311+
name: thread-transfer-results
312+
path: ${{ runner.temp }}/thread-transfer
313+
286314
# Split out of Check and Test: both paid ~7-9s to install a Rust toolchain
287315
# for checks that take under 3s, on the critical path of every PR.
288316
rust:
@@ -466,6 +494,7 @@ jobs:
466494
test,
467495
test_web,
468496
test_server,
497+
transfer-report,
469498
rust,
470499
mobile_native_changes,
471500
mobile_native_static_analysis,

‎.github/workflows/deploy-relay.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
push:
55
branches:
66
- main
7-
# Alchemy does not redeploy the Worker when only a Config value read in its
8-
# Init changes (alchemy-run/alchemy#1831), so a changed repository variable
9-
# needs a forced deploy to reach production.
7+
# Redeploys main after a variable or secret change. Alchemy redeploys the
8+
# Worker when a value it reads changes, so force is rarely needed, and it
9+
# replaces the Postgres runtime role (alchemy-run/alchemy#1832).
1010
workflow_dispatch:
1111
inputs:
1212
force:
13-
description: Redeploy every resource, including ones with no detected changes
13+
description: Redeploy every resource, including ones with no detected changes. Replaces the Postgres runtime role.
1414
type: boolean
15-
default: true
15+
default: false
1616

1717
permissions:
1818
contents: read
@@ -40,6 +40,7 @@ jobs:
4040
RELAY_API_ZONE_NAME: ${{ vars.RELAY_API_ZONE_NAME }}
4141
RELAY_TUNNEL_ZONE_NAME: ${{ vars.RELAY_TUNNEL_ZONE_NAME }}
4242
RELAY_TUNNEL_CLEANUP_MODE: ${{ vars.RELAY_TUNNEL_CLEANUP_MODE }}
43+
RELAY_LEGACY_TUNNEL_CLEANUP_MODE: ${{ vars.RELAY_LEGACY_TUNNEL_CLEANUP_MODE }}
4344
CLERK_PUBLISHABLE_KEY: ${{ vars.CLERK_PUBLISHABLE_KEY }}
4445
CLERK_JWT_AUDIENCE: ${{ vars.CLERK_JWT_AUDIENCE }}
4546
APNS_ENVIRONMENT: ${{ vars.APNS_ENVIRONMENT }}

‎.github/workflows/mobile-eas-preview.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ jobs:
6666
if: steps.expo-token.outputs.present == 'true'
6767
uses: expo/expo-github-action@v8
6868
with:
69-
eas-version: latest
69+
# eas-cli 22 renamed `project` to `app` in build JSON, and
70+
# continuous-deploy-fingerprint still reads `build.project.ownerAccount`.
71+
# Unpin once https://github.com/expo/expo-github-action/issues/358 is fixed.
72+
eas-version: 21.8.0
7073
token: ${{ secrets.EXPO_TOKEN }}
7174
# npm, not pnpm: this only installs eas-cli into the action's own
7275
# tool dir, and pnpm 11 hard-fails that install on dtrace-provider's

0 commit comments

Comments
 (0)