Skip to content

Release v0.16.4 — Kortix in Chrome, colored wallpapers, and workspace setup from the CLI - #12979

Merged
DimitrijeGlibic merged 37 commits into
prodfrom
release/v0.16.4
Nov 22, 2026
Merged

DimitrijeGlibic merged 37 commits into
prodfrom
release/v0.16.4

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Kortix in Chrome, colored wallpapers, and workspace setup from the CLI

New

Improved

Fixed

Internal

agent-kortix and others added 19 commits November 20, 2026 18:03
…X-5031) (#12950)

## Demo video

No demo video: code-only change. The diff adds one unit test. No
renderer or runtime code changes, so there is no new screen to record.

## Quick verification

- **Outcome:** a `/command` message now has a test for its replay
privacy. The test checks that the command chip and the args the person
typed sit inside the `[data-replay-content]` region. That region is what
`REPLAY_CONTENT_SELECTOR` (existing,
`apps/web/src/lib/analytics/posthog-config.ts`) hides in a session
replay. Until now no test on `dev` checked the marker on user-message
text, so a renderer refactor could drop it and leak typed command args
into replays without failing anything.
- **Why this shape (the issue's acceptance, as I read it):** KRTX-5031
asked to add `data-replay-content` to the four byte-identical
command-markup fixtures. #12923 (KRTX-5013) has since deleted those
fixtures from `dev` under AGENTS.md testing rule 6 ("delete on red"),
and two earlier attempts stopped there as obsolete. I did not restore
the deleted fixtures. Instead I kept the issue's intent: the command
markup must carry the replay redaction marker. I assert it as a privacy
behavior (rule 6 keeps tests for secrets and privacy decisions). The
production renderer is unchanged (existing
`packages/ui/src/session/turn/user-message.tsx:1169`), and no assertion
is weakened.
- **Caller boundary:** the command comes either from `commandInfo`
passed by `transcript.tsx:1730` or from `detectCommandFromText`. Both
render through the single `UserMessageBubble` call site (existing,
`user-message.tsx:2110`), so this test covers the one region both paths
share.
- **Red before green:** I removed `data-replay-content=""` from the
renderer and ran the new test: `0 pass, 1 fail` with
`expect(received).not.toBeNull() Received: null`. I then restored the
renderer and it passed.
- **Risk:** low. The diff is test-only: one test and one `happy-dom`
import, which is already a devDependency of `@kortix/ui` and is used by
sibling tests.
- **Verified:** `bun test src/session/turn/user-message.test.tsx` gives
97 pass, 0 fail. The whole `@kortix/ui` suite (`pnpm test`) gives 9599
pass, 0 fail. `pnpm typecheck` exited 0, and eslint on the changed file
exited 0. Not run: the local stack and the browser, because the diff
changes no runtime code and nothing new is visible.
- suna-skills: contributing, create-pr (template), testing, worktree,
learnings (searched replay/posthog: no entry for this surface)
- ponytail: full · review: Lean already. Ship. · markers: 0
- Self-review: 1 items found and fixed (the first draft's
`hidden?.querySelector(...)` was `undefined` with no marker and still
passed `.not.toBeNull()`; it is now a descendant selector, which fails
with `null`)
- Closes KRTX-5031

```
$ cd packages/ui && bun test src/session/turn/user-message.test.tsx -t "replay"   # renderer marker removed
error: expect(received).not.toBeNull()
Received: null
 0 pass
 1 fail

$ cd packages/ui && bun test src/session/turn/user-message.test.tsx
 97 pass
 0 fail
 315 expect() calls
Ran 97 tests across 1 file. [1353.00ms]

$ cd packages/ui && pnpm test
 9599 pass
 0 fail
Ran 9599 tests across 872 files. [538.46s]

$ cd packages/ui && pnpm typecheck; echo exit=$?
exit=0
$ cd packages/ui && pnpm exec eslint src/session/turn/user-message.test.tsx; echo exit=$?
exit=0
```

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/enable-autofix?expires=1797779707&installation_model_id=434224&pr_number=12950&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12950&signature=7f218d6b347215fbb4b0137bfc7825c6cdc0ecf4fbd1bf712d7f5335532c2c9a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img
alt="Autofix with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png"
width="190" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12950?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
…-5042) (#12956)

## Demo video

No demo video: code-only change. Gateway valuation and subscription
accounting only.

## Quick verification

- Outcome: price Sol, Terra, Morph's documented upstream proxy, and
Claude 5.5 Opus/Sonnet. Record Claude input/output/cache usage without
charging subscription calls or logging payloads. Closes KRTX-5042.
- Feedback: require observed input/output counters; malformed, oversized
or invalid frames stay incomplete and unpriced. Optional cache counters
default to zero. Relay bytes unchanged. Claude settlement cannot release
a paid request's block-budget reservation.
- Risk: unknown models stay unpriced; historical missing Claude usage
cannot be recovered. Morph retail proxy is not a bill. No migration.
Roll back by reverting this PR.
- Verified on head 92d8743 after merging origin/dev: the commands
below passed. No whole-package suites: repository AGENTS.md requires
named targeted files.

```sh
. scripts/hermetic-test-env.sh
bun --env-file=apps/api/scripts/test.env test --isolate packages/llm-gateway/src/claude-code/usage.test.ts packages/llm-gateway/src/claude-code/passthrough.test.ts packages/llm-gateway/src/create-gateway.test.ts apps/api/src/shared/llm-value.test.ts apps/api/src/llm-gateway/hooks.test.ts apps/api/src/__tests__/unit-gateway-budgets.test.ts apps/cli/src/__tests__/sessions-usage.test.ts apps/cli/src/__tests__/gateway.test.ts
131 pass
0 fail
394 expect() calls
Ran 131 tests across 8 files. [20.61s]

bun test packages/llm-gateway/src/claude-code/usage.test.ts packages/llm-gateway/src/create-gateway.test.ts
27 pass
0 fail
83 expect() calls
Ran 27 tests across 2 files. [259.00ms]

pnpm --filter @kortix/llm-gateway typecheck
# exit 0
pnpm --filter kortix-api typecheck
# exit 0
cd apps/api && ../../node_modules/.bin/eslint src/llm-gateway/hooks.ts src/llm-gateway/hooks.test.ts src/shared/llm-value.ts src/shared/llm-value.test.ts src/shared/integration-llm-value.test.ts
# exit 0; 0 errors, 3 ignored-test warnings
```

- Red before fix: usage parser 6 pass / 4 fail; real HTTP caller with
old parser 15 pass / 2 fail; reservation regression 29 pass / 1 fail.
Real local upstream tests assert 11/23/37/53 plain/read/write/output
becomes inclusive input 71/output 53, plus damaged JSON/SSE produce
estimated usage and unsuccessful traces without changing response bytes.
- Unrun this session: local API stack, GW-11, and DB suites. `pnpm
worktree start krtx-5042-rework --no-web` failed: primary Supabase REST
503 because schema `kortix` does not exist; primary Supabase credentials
unavailable. No deployed CLI/provider call or paid subscription call.
The prior worker's DB evidence remains in the earlier PR history; it is
not a run from this session.
- DB assertions inspected: integration-llm-value still prices exact
provider/model rows and daily series; integration-session-usage still
sums recorded counts; gateway-series and covering-index suites keep
unchanged columns/indexes. No schema change. The repair only invalidates
damaged usage and avoids releasing an unreserved Claude request.
- Self-review: 1 items found and fixed (block-budget release). A–H
checked against all acceptance criteria; caller/adapter traced from
gateway HTTP routes through createGateway, passthrough, observer and
settlement. No alternate production observer caller exists. Independent
G9 remains required.
- suna-skills: worktree, testing, learnings, contributing (attachments
and preview references), create-pr, claude-cli
- ponytail: full · review: Lean already. Ship. · markers: 0
- Issue: https://linear.app/kortix/issue/KRTX-5042

---------

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
…abels (#12962)

The reviewer path on prod is email, "Use a password", Allow, then Finish on the welcome tab; the prompt goes in the workspace home. The reference also records how the reviewer account is created.
## Review in 60 seconds

- Config commits now include `Kortix-Actor` and `Kortix-Session`
trailers from server authentication.
- Manifest, prompt, agent governance/default, and skill multi-file
writes share one formatter. Both Git CLI and GitHub Contents paths carry
attribution.
- A dedicated authentication-session field prevents route-target
sessions or request-body identity fields from changing attribution.
Missing identity/session is recorded as `none`.

No demo video: code-only change

**Risk:** Adds authenticated principal identifiers to workspace Git
history, as requested. No schema, permissions, author identity, or
public API change. Revert this PR to stop adding trailers; existing
commits remain unchanged.
**Verified:** Focused tests: 30 pass, 0 fail. Related tests: 130 pass, 0
fail. API typecheck exit 0. Changed-file eslint exit 0 (test files
ignored by existing config). Real local bare-Git commit and persisted
message verified. Full-stack flow could not run: fresh Supabase
PostgREST requires the absent `kortix` schema before stack
startup/migrations complete.

suna-skills: worktree, testing, learnings, contributing, create-pr
ponytail: full · review: Lean already. Ship. · markers: 0
Self-review: 1 items found and fixed

## Demo video

No demo video: code-only change. Real Git commit assertions and Hono
request/principal boundary tests provide the relevant proof.

## Quick verification

Outcome: platform config commits identify their authenticated caller
without accepting body-supplied identity.

`bun --env-file=scripts/test.env test --isolate
src/lib/request-context.test.ts
src/projects/git/manifest-cas.integration.test.ts
src/projects/lib/commit-manifest-cas.test.ts
src/middleware/auth-config-attribution.test.ts
src/projects/lib/config-commit-message.test.ts` → 30 pass; 0 fail; 74
expect() calls.

Closes KRTX-5049 — https://linear.app/kortix/issue/KRTX-5049

Root cause: config writers forwarded operation-only messages;
token-bound session identity was not propagated to asynchronous request
context.

Caller boundary: actual `patPrincipal`, `serviceAccountPrincipal`, and
`jwtPrincipal` run behind a Hono request adapter with forged body IDs
and a different route-target session. The commit formatter retains the
principal identity. An actual local bare Git repository proves the
stored manifest commit contains the trailers. GitHub Contents and Git
CLI adapters are separately asserted. Alternate direct agent-config and
project-skills callers explicitly use the same formatter; OAuth already
propagates the authenticated user and has no bound platform session.

Self-review A–H: all acceptance behaviors covered; no permission, schema
or rollout change. One test fixture lacked required project-row fields;
fixed without casts. Ponytail review: Lean already. Ship. No new
dependencies. Independent G9 remains the merge gate's responsibility.

## How was this tested?

`bun --env-file=scripts/test.env test --isolate
src/lib/request-context.test.ts
src/projects/git/manifest-cas.integration.test.ts
src/projects/lib/commit-manifest-cas.test.ts
src/middleware/auth-config-attribution.test.ts
src/projects/lib/config-commit-message.test.ts` → 30 pass; 0 fail; 74
expect() calls.

Commands ran from `apps/api` unless stated otherwise.

```text
bun test apps/api/src/projects/lib/config-commit-message.test.ts
# Before implementation (identity formatter returned the unmodified operation):
0 pass
4 fail
4 expect() calls
Ran 4 tests across 1 file. [54.00ms]

bun --env-file=scripts/test.env test --isolate src/middleware/auth-config-attribution.test.ts src/projects/lib/commit-manifest-cas.test.ts src/projects/git/manifest-cas.integration.test.ts
# Removed auth-session propagation and manifest-message attribution, retaining tests:
17 pass
5 fail
61 expect() calls
Ran 22 tests across 3 files. [4.77s]

bun --env-file=scripts/test.env test --isolate src/lib/request-context.test.ts src/projects/git/manifest-cas.integration.test.ts src/projects/lib/commit-manifest-cas.test.ts src/middleware/auth-config-attribution.test.ts src/projects/lib/config-commit-message.test.ts
30 pass
0 fail
74 expect() calls
Ran 30 tests across 5 files. [4.74s]

bun --env-file=scripts/test.env test --isolate src/middleware/auth.test.ts src/middleware/auth-characterization.test.ts src/middleware/auth-sso-sync.test.ts src/projects/lib/triggers.test.ts src/projects/git/manifest-imports.integration.test.ts src/connectors/manifest-crud-create-only.test.ts src/__tests__/unit-auth-logout-revocation.test.ts src/__tests__/unit-secret-grant-route.test.ts
130 pass
0 fail
413 expect() calls
Ran 130 tests across 8 files. [8.71s]

# Repository root:
pnpm --filter kortix-api typecheck
> tsgo --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsgo.tsbuildinfo
exit 0

# apps/api:
../../node_modules/.bin/eslint src/lib/request-context.ts src/middleware/auth-principal.ts src/middleware/auth-config-attribution.test.ts src/projects/lib/config-commit-message.ts src/projects/lib/config-commit-message.test.ts src/projects/lib/trigger-manifest.ts src/projects/routes/agent-config.ts src/projects/routes/project-skills.ts
0 errors, 2 warnings (test files ignored by existing configuration)
exit 0

# Repository root:
pnpm worktree start krtx-5049
supabase_rest_kortix-local unexpected status 503
Failed to load the schema cache: schema "kortix" does not exist
primary Supabase credentials are unavailable
exit 1

pnpm test -- --id PROJ-19
local database migration exited with code 1
code: "57P01" (stack startup stopped the database after failed health checks)
FAIL api-cli-flows
exit 1

git merge origin/dev --no-edit
Already up to date.
git diff --check
exit 0
```

Full API package suite was not run: repo AGENTS.md and testing skill
explicitly prohibit whole-package runs during development. Focused and
related files were run instead.

Unverified DB-backed coverage: `integration-iam-build-actor.test.ts`
uses principal bindings unchanged by the added context field;
`integration-session-list-poll-memo-attribution.test.ts` and
`integration-session-participants-roster.test.ts` retain
session/participant state unchanged. `PROJ-19` config bodies/responses,
CAS and permissions are unchanged; only Git messages gain trailers.
Local HTTP stack and deployed-dev verification remain unverified. The
Git-only `manifest-cas.integration.test.ts` and
`manifest-imports.integration.test.ts` did run successfully.

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
## Demo video

No demo video: code-only change.

## Quick verification

Outcome: KRTX-5050 rejects undeclared agents in `on`/`run` triggers.
POST and PATCH refuse new manifest errors before committing.

- The validator reports `triggers[i].run.agent`; declared agents,
`default`, `mykortix`, its legacy alias, and omitted agents remain
valid. Flat references remain checked.
- Root cause: cross-validation read only flat `agent`; trigger CRUD also
did not call the existing added-error validator. Reused
`addedManifestErrors` on both write paths.
- **Risk:** invalid trigger edits now return 400. Existing unrelated
manifest errors remain editable. No migration. Rollback: revert this PR.
- **Verified:** manifest-schema and API typechecks exit 0; changed API
file ESLint exits 0; 607 targeted parser tests pass; TRG-2 passes
through the local HTTP stack, including POST/PATCH refusal and unchanged
manifest read-back.

```sh
bun test packages/manifest-schema/src/__tests__/validator.test.ts packages/manifest-schema/src/__tests__/validator.v3.test.ts packages/manifest-schema/src/__tests__/validator.rules.test.ts packages/manifest-schema/src/__tests__/validator.coverage.test.ts packages/manifest-schema/src/__tests__/json-schema.conformance.test.ts
607 pass
0 fail
1601 expect() calls
Ran 607 tests across 5 files. [1336.00ms]

pnpm test -- --id TRG-2
results: 1/1 passed · 0 failed · 0 skipped · 0 todo · 1.5s
[test] PASS api-cli-flows 46.5s

pnpm --filter @kortix/manifest-schema typecheck
exit 0
pnpm --filter kortix-api typecheck
exit 0
cd apps/api && bunx eslint src/projects/routes/triggers.ts
exit 0
```

Before fix: validator regression run had `84 pass; 5 fail`. Before the
route guard, TRG-2 failed: `expected [400], got 201`. The final flow
verifies both POST and PATCH reject `ghost`, and reads the manifest back
unchanged. The existing create still returns 201.

Adapter check: `bun --no-env-file /workspace/out/run-adapter.ts`
launches the existing `trigger-on-run.test.ts` with the deterministic
local API environment: `8 pass; 0 fail; 15 expect() calls`.

Unrun: full package/release suites, prohibited during development by
repository AGENTS.md/testing. Dev deployment verification awaits merge.
No external managed Git repository or cloud sandbox is used; the local
flow uses its real bare-Git fixture and database.

Self-review: 2 items found and fixed. Final A–H review: no outstanding
defects. Caller boundary: POST/PATCH → draft → on/run serializer →
addedManifestErrors → canonical validator; the CLI shares the validator.
No helper duplication or dependency added.

suna-skills: worktree, testing, learnings, contributing (attachments and
preview references), create-pr.
ponytail: full · review: Lean already. Ship. · markers: 0

Closes https://linear.app/kortix/issue/KRTX-5050

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/enable-autofix?expires=1797812988&installation_model_id=434224&pr_number=12967&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12967&signature=1de79ac7a44ca6cc2772007901bcedf5260842cd408e94a12308196767d16d33"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img
alt="Autofix with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png"
width="190" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12967?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
…#12970)

## Demo video

No demo video: code-only change. Deletes unreachable code without
changing runtime behavior.

## Quick verification

Outcome: removes two unused snapshot orchestration modules and one
unused workflow constant. Closes KRTX-5056:
https://linear.app/kortix/issue/KRTX-5056

- Deletes hydrate.ts and stage.ts; repository-wide export searches found
no callers or loader references.
- Deletes META_AGENT_LINES; the existing APPROVAL_AGENT_LINES=12 and all
workflow functions remain unchanged.
- Existing snapshot transport, integrity checks, config-release
fallbacks and tests remain unchanged. The issue explicitly requests
reuse of its three characterization files, not a new harness.

**Risk:** low — no caller reaches the removed definitions. Revert this
PR to restore them. Existing comments in contract.ts/retry.ts and
ARCHITECTURE.md still describe the old orchestration; no import/loader
reference remains. ARCHITECTURE.md is excluded by the >10
commits/30-days churn rule (12 commits).

**Verified:** named characterization tests pass before and after;
package typecheck, lint and architecture pass. Worktree stack attempted
but unavailable: primary Supabase PostgREST returns 503 because schema
`kortix` does not exist; API/web did not start. Full-stack/dev
verification remains unverified. No whole-package suite was run, per
repository testing skill.

<details><summary>How was this tested? Commands and real runner
summaries</summary>

From apps/kortix-sandbox-agent-server, before deletion and after
deletion:

```sh
bash scripts/test.sh src/__tests__/pi-config-release.test.ts
# before
28 pass
0 fail
151 expect() calls
Ran 28 tests across 1 file. [2.03s]
# after
28 pass
0 fail
151 expect() calls
Ran 28 tests across 1 file. [2.21s]

bash scripts/test.sh src/__tests__/snapshot-retry.test.ts
# before and after
4 pass
0 fail
2510 expect() calls

bash scripts/test.sh src/__tests__/pi-workflow.test.ts
# before
47 pass
0 fail
415 expect() calls
Ran 47 tests across 1 file. [13.28s]
# after
47 pass
0 fail
415 expect() calls
Ran 47 tests across 1 file. [13.56s]

# Final named characterization selection (same three files, not whole-package tests)
files=(src/__tests__/pi-config-release.test.ts src/__tests__/snapshot-retry.test.ts src/__tests__/pi-workflow.test.ts)
bash scripts/test.sh "${files[@]}"
79 pass
0 fail
3076 expect() calls
Ran 79 tests across 3 files. [13.42s]

bun run typecheck
$ tsgo --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsgo.tsbuildinfo
# exit 0
bun run lint
$ eslint src
# exit 0
bun run test:architecture
# tests 237
# pass 237
# fail 0
# duration_ms 2554.037413

pnpm worktree start krtx-5056
# supabase_rest_kortix-local unexpected status 503
# primary Supabase credentials are unavailable
# exit 1: schema "kortix" does not exist
```

Caller-boundary proof: production createPiConfigReleases.boot calls
obtainRelease. Tests materialize real archives/Git repositories across
snapshot-present/archive-absent, Git-only, unavailable source, signed
archive/API fallback and last-known-release/image-default cases.
Workflow tests run production pi with local synthetic HTTP/model
fixtures. Removed exports have no alternate caller. No DB-backed test
imports the removed modules.

```sh
git diff --shortstat origin/dev
3 files changed, 303 deletions(-)
git diff --check
# exit 0
git diff --color-moved=zebra --color-moved-ws=allow-indentation-change origin/dev
# Summary: 303 deleted lines, 0 added lines, 0 moved blocks.
# This is the issue's explicit DELETE task, not a relocation; retained lines/comments are unchanged.
```

The requested codebase-analysis metrics command ran at base b5066c2 and
after deletion with `metrics --unit sandbox-agent-server --root
/workspace/suna-krtx-5056 --fetch-tools`.
Production files 206 → 204; production LOC 49002 → 48699; unused_exports
203 → 198. Named dead_file_candidates (these two paths) 2 → 0; aggregate
analyzer dead_file_candidates remains 2 → 2 (other candidates, not this
issue). signal: unreferenced_snapshot_modules=2 → 0;
unused_workflow_constants=1 → 0. Churn: hydrate 1, stage 1,
workflow-script 3 commits/30 days.

</details>

suna-skills: worktree, testing, learnings, contributing (attachments and
preview-environments references), create-pr

Self-review: 0 items found and fixed. Checks A–H completed locally;
independent G9 remains separate.

ponytail: full · review: Lean already. Ship. · markers: 0

model=kortix/codex/gpt-6.1-sol route=code reason=complex-scope

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797830393&installation_model_id=434224&pr_number=12970&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12970&variant=start_proof&signature=3cf129e38eb932c82ab96054bf87ac64215f70d95db8e9d366465f7a2ac0d27b"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-start-proof-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-start-proof-v2-light.svg"><img
alt="Start Proof"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-start-proof-v2-dark-3x.png"
width="108" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12970?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
…anch (KRTX-5043) (#12966)

## Review in 60 seconds

- **What:** every Kortix config write (connectors, triggers, agent
scope, agent config, skills, apps, channels) serializes through
`manifestWrites`. It now validates the complete candidate tree, merged
with every import, and refuses a write that adds a validation error:
`409 manifest_invalid` with the validator's issues, and nothing is
committed. Before, trigger, connector and scope writes committed
whatever the route built.
- **Why it holds:** the check sits in the one serializer every commit
path calls, so no entry point can skip it. A compare-and-swap retry
serializes again, so the tree that is committed is the tree that was
checked. A file that already carries an error stays editable: only added
errors count, and list indexes no longer turn an existing error into a
"new" one.
- **Found on the way:** the platform's secret binding (`PUT
…/connectors/:slug/secret-binding`, #10883) writes
`connectors[].auth.secret`, which the validator rejected outright, so
the new gate broke flow `CONN-MCP-SECRET-1`. The runtime parser reads
that field as a project-secret name. The validator and the JSON schema
now accept an exact project-secret name and still reject anything else
(a raw value, a non-string, a name with surrounding whitespace).
- **Review fix (G9 item 1, head f814865):** `commitManifest` caught the
structured refusal and returned only `{ error, status }`, so the CAS
retry and every route that renders `{ error }` (triggers, agent scope,
connectors, Apps) dropped `code`, `issues` and `issue_count`. The
refusal now throws through `commitManifest` and the retry, and the one
HTTP error handler answers `409 { error, code: 'manifest_invalid',
issues, issue_count }` for every caller. Background callers (channel
connector reconcile, the OAuth move finish) already catch every error.
- **Review fix (G9 item 1, head 67e1427):** the validator trimmed
`auth.secret` before the name check, so `" TOK "` passed it while the
published JSON schema rejected it. Both now check the exact value (the
platform's binding always writes an exact stored secret identifier,
`connectors/db-deps-admin.ts:84`). A conformance fixture pins the two
validators to the same verdict.
- **Scope:** this is the validate-before-commit seam of KRTX-5043, in
kortix-ai/CompanyOS (the issue's repository; intake routed it to the
company playbook only because of `source:factory-eval`). The workspace's
own policy validator (`validate-company-hardening.mjs`: prohibited
models, required connectors, refresh-prefix guards) is KRTX-5048.
Actor/session commit trailers are KRTX-5049. The `run.agent` validator
gap found while verifying is KRTX-5050. The issue's acceptance is
rewritten to this scope; the original criteria are in its comments.

No demo video: the only `apps/web` files are the two regenerated static
JSON schemas (`public/schema/kortix*.schema.json`, editor
autocompletion). No page or component changed; the behavior is API and
CLI, exercised below with curl, the real CLI process and the flow
runner.

**Risk:** medium — a config write that adds a validation error now
answers 409 instead of committing. Flows that write config through the
API (12 domains, 372 flows) pass, and a file that already has errors
stays editable, but a legacy-format manifest (`kortix_version` 1/2,
`kortix.toml`) has no pre-edit text, so its existing errors are not
exempt: an API edit of such a file is refused until it is valid.
`auth.secret` is accepted again when it names a project secret.
**Verified:** head 75d649c: conformance fixture `" TOK "` red before the
fix (319 pass / 1 fail), `bun test` (manifest-schema) 870 pass / 0 fail;
`kortix validate` and the published v3 schema agree on `TOK` / `" TOK "`
/ `not-a-name` (valid / invalid / invalid); `bash scripts/test.sh`
(kortix-api unit, 75d649c) 16516 pass / 38 fail, the 37 pre-existing git
≥ 2.45 fixtures plus `e2e-preview-proxy` under batch load (90 pass / 0
fail alone, 3 runs); API config/connector files 97 pass / 0 fail;
apps/cli validate/schema tests 33 pass / 0 fail. Earlier heads: `bun
test src/projects/git/manifest-write-validation.test.ts` 6 pass / 0 fail
(4 fail with the old `commitManifest` catch, 4 fail at origin/dev code);
7 config-write files (CAS, imports, triggers, connector create-only,
secret-grant route) 87 pass / 0 fail; `bash scripts/test.sh` (kortix-api
unit, head 67e1427) 16517 pass / 37 fail, all 37 the pre-existing git ≥
2.45 partial-store fixtures; `bun test` (manifest-schema) 856 pass / 0
fail; db-suites 88/89 suites (the one failure pre-existing, git ≥ 2.45);
`pnpm test -- --domain
triggers,connectors,projects,agent-principals,channels,apps,change-requests,git,iam,cli,config-releases,secrets`
372/372; live API curl and `kortix validate`; tsgo 0; eslint 0.
Self-review: 6 items found and fixed
suna-skills: worktree, testing, learnings, contributing, create-pr
(template), ponytail-review
ponytail: full · review: Lean already. Ship. · markers: 0

## Summary

`apps/api/src/projects/manifest-io.ts`
- `manifestWrites` runs `addedManifestErrors(manifestAsRead(manifest),
manifest.raw)` after the existing not-YAML refusal and throws
`ManifestWriteRefusedError(message, issues)` when the candidate adds an
error. `manifestAsRead` is the document as read: the merged one with
`imports:`, else the root text, else `{}` (a synthesized blank or a
converted legacy file).
- `addedManifestErrors` ignores list indexes (`triggers[1]` →
`triggers[]`) and counts each error, so deleting `triggers[0]` does not
make the existing error of `triggers[1]` new, and a second copy of an
error is still new. Its other callers (agent config, skills) get the
same fix.
- `ManifestWriteRefusedError` carries the optional `issues`.

`apps/api/src/projects/lib/trigger-manifest.ts` — `commitManifest` lets
`ManifestWriteRefusedError` (an added validation error, or the not-YAML
refusal) throw through itself and `mutateManifestWithRetry`; the
separate not-YAML pre-check is gone because `manifestWrites` raises it.
Every HTTP caller then answers through `http-errors.ts` with the full
envelope, whatever its own `!result.ok` branch renders.

`apps/api/src/http-errors.ts` — a thrown refusal (from `commitManifest`
and the retry, and from the agent config and skills routes that call
`manifestWrites` directly) answers `409 { error, code:
'manifest_invalid', issues, issue_count }`; the not-YAML response is
unchanged.

`packages/manifest-schema` — `connectors[].auth.secret` must match
`^[A-Z_][A-Z0-9_]{0,63}$` (`SECRET_NAME_RE`) exactly, untrimmed, in the
validator and the JSON schema;
`apps/web/public/schema/kortix.schema.json` and
`apps/web/public/schema/kortix.v3.schema.json` regenerated with `bun run
generate:schema`.
The rule is the existing runtime parser's, in
`apps/api/src/projects/connectors.ts` (unchanged).

Why 409 and not 422: every config route already declares 409 in its
OpenAPI contract and casts its status to a union without 422;
`project-skills` already answers this exact case with `409
manifest_invalid` + issues. No response contract changes.

## Demo video

No demo video: no UI changed (see Review in 60 seconds). Real-surface
evidence is in How was this tested?.

## Type of change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature
- [ ] Breaking change
- [ ] Docs or tests only

## How was this tested?

Red first, at the real commit boundary (local bare git remote,
`commitManifest`, `mutateManifestWithRetry`, a Hono app with
`installHttpErrors`). The final test file at origin/dev code — the
invalid write is committed:

```
$ pnpm test src/projects/git/manifest-write-validation.test.ts   # source files at origin/dev
(fail) … a write that adds a validation error is refused with the diagnostic; the branch does not move
(pass) … a valid write commits and reads back
(pass) … a file that already carries an error stays editable, even when the edit moves that error to another index
(fail) … imported manifests take part: an invalid edit of an imported entry is refused, a root entry that needs one is accepted
(fail) … a retry after a concurrent write validates the new candidate, not the stale one
(fail) … a route that commits through manifestWrites answers 409 manifest_invalid with the issues
 2 pass
 4 fail
```

The index-shift test is red when the index normalization is removed
(mutation check):

```
$ pnpm test src/projects/git/manifest-write-validation.test.ts   # key without .replace(/\[\d+\]/g, '[]')
(fail) … a file that already carries an error stays editable, even when the edit moves that error to another index
 5 pass
 1 fail
```

Review item 1 (G9, head f814865), red first: the route test drives the
real `mutateManifestWithRetry` → `commitManifest` → `installHttpErrors`
path on a real git remote, with a route that renders a failed result as
`{ error }` exactly like the trigger, scope, connector and App routes.
With the `commitManifest` catch of head f814865 put back:

```
$ cd apps/api && bun test --env-file=scripts/test.env --isolate src/projects/git/manifest-write-validation.test.ts   # old catch restored
(fail) … a write that adds a validation error is refused with the diagnostic; the branch does not move
(pass) … a valid write commits and reads back
(pass) … a file that already carries an error stays editable, even when the edit moves that error to another index
(fail) … imported manifests take part: an invalid edit of an imported entry is refused, a root entry that needs one is accepted
(fail) … a retry after a concurrent write validates the new candidate, not the stale one
(fail) … a route that commits through the retry answers 409 manifest_invalid with the issues
 2 pass
 4 fail
```

The same failure through the real `PATCH
/v1/projects/:id/triggers/:slug` route (DB suite, local Supabase) at
head f814865 plus the test, before this fix and before the merge of
origin/dev that brought KRTX-5050:

```
$ pnpm test -- --db-only integration-manifest-write-refusal-http
-   "code": "manifest_invalid",
-   "issue_count": 1,
-   "issues": [ { "path": "triggers[0].agent", … } ],
+   "error": "The change would make the project configuration invalid. Fix kortix.yaml: triggers[0].agent: agent \"ghost\" does not match any declared agent …",
 1 pass
 1 fail
```

That route test is not in the PR: after merging origin/dev, KRTX-5050
(#12967) makes the trigger create and PATCH routes run
`addedManifestErrors` themselves (a 400 before the commit), so it no
longer reaches the commit gate. I found no other route input (agent
scope, connectors) that its own check lets through; the commit gate is
the defense for every one that does.

At the head:

```
$ cd apps/api && bun test --env-file=scripts/test.env --isolate src/projects/git/manifest-write-validation.test.ts src/projects/lib/commit-manifest-cas.test.ts src/projects/git/manifest-cas.integration.test.ts src/projects/git/manifest-imports.integration.test.ts src/projects/lib/triggers.test.ts src/connectors/manifest-crud-create-only.test.ts src/__tests__/unit-secret-grant-route.test.ts
 87 pass
 0 fail
Ran 87 tests across 7 files. [11.65s]
```

The merge of origin/dev brought `persists authenticated attribution on a
real manifest commit` (KRTX-5049), which wrote `name:` at the root, an
unknown key the gate refuses. Its fixture now writes `project.name`; the
test is about the commit trailers, not that key.

manifest-schema, red then green (`auth.secret` names a project secret):

```
$ cd packages/manifest-schema && pnpm test src/__tests__/validator.test.ts src/__tests__/json-schema.conformance.test.ts   # before the validator change
(fail) validateManifest — connectors > auth.secret names a project secret: a secret name is accepted, anything else is rejected
(fail) JSON Schema vs. imperative validator — accept/reject conformance > connectors.auth.secret names a project secret (the value lives in the platform)
 394 pass
 2 fail
$ bun test   # the whole package at the head, json-schema.sync included
 856 pass
 0 fail
Ran 856 tests across 23 files.
```

Review item 1 (G9, head 67e1427), red first. New conformance fixture
`connectors.auth.secret with surrounding whitespace is not an exact
project-secret name` (`secret: " TOK "`), before the validator change:

```
$ cd packages/manifest-schema && bun test src/__tests__/json-schema.conformance.test.ts
Expected: false
Received: true
(fail) JSON Schema vs. imperative validator — accept/reject conformance > connectors.auth.secret with surrounding whitespace is not an exact project-secret name
 319 pass
 1 fail
```

After `SECRET_NAME_RE.test(auth.secret)` (no `.trim()`), head 75d649c:

```
$ bun test src/__tests__/json-schema.conformance.test.ts
 320 pass
 0 fail
$ bun test   # whole package; `validator.test.ts` also asserts `" STRIPE_API_KEY "` is rejected
 870 pass
 0 fail
Ran 870 tests across 23 files.
$ bun run generate:schema && git status --short apps/web/public/schema
Wrote 2 schema file(s)          # no diff: the schema already had the exact pattern
```

Real CLI process and the published schema (ajv 2020 over
`apps/web/public/schema/kortix.v3.schema.json`), same three files:

```
c1 secret=[TOK]        cli_exit=0 is valid                    schema valid= true
c2 secret=[" TOK "]    cli_exit=1 error connectors[0].auth.secret  schema valid= false
c3 secret=[not-a-name] cli_exit=1 error connectors[0].auth.secret  schema valid= false
```

API and CLI tests that read the validator (head 75d649c):

```
$ cd apps/api && bun test --isolate --env-file=scripts/test.env src/projects/git/manifest-write-validation.test.ts src/connectors/manifest-auth-secret.test.ts src/__tests__/unit-connectors-parse.test.ts src/__tests__/unit-connector-materialize.test.ts
 97 pass
 0 fail
$ cd apps/cli && bash scripts/test.sh src/__tests__/validate-v3-wiring.blackbox.test.ts src/__tests__/validate-argv.blackbox.test.ts src/__tests__/schema.test.ts
 33 pass
 0 fail
```

Whole kortix-api unit suite at head 75d649c: `pass 16516 · fail 38`
(summed over the batches). 37 are the pre-existing git ≥ 2.45
partial-store fixtures below; the 38th, `Preview proxy: forwarding >
retries transient project env sync failures`, failed under batch load
and passes alone (`e2e-preview-proxy.test.ts` 90 pass / 0 fail, three
runs); it fails the same way at origin/dev (below). `pnpm typecheck`
kortix-api and manifest-schema exit 0. manifest-schema has no ESLint
config; Biome on its three changed files: 26 errors before and after the
change (pre-existing `noNonNullAssertion`, none on a changed line).

Whole kortix-api unit suite at the previous head (Linux):

```
$ cd apps/api && bash scripts/test.sh   # head 67e1427
pass 16517 · fail 37 (summed over the batches)
```

Pre-existing: the 37 failures are all `need git 2.45 or later`
partial-store fixtures (this host has git 2.39.5) and fail the same at
origin/dev (`config-releases/partial-store.test.ts`,
`git-proxy/project-snapshot-build.test.ts`,
`projects/git/{merge-preview-burst,object-store,partial-store-config,partial-store-diff-cap,partial-store-history}.test.ts`).
None imports `manifestWrites`, `commitManifest`,
`mutateManifestWithRetry` or `http-errors`:

```
$ pnpm test <those 7 files + e2e-preview-proxy.test.ts>   # at origin/dev and at head f814865; e2e-preview-proxy passes at 67e1427
 92 pass
 38 fail
Ran 130 tests across 8 files.
```

Real-git CAS and imports suites (no database needed), with fixtures made
valid (`provider: http` gets the `base_url` the schema requires; the
tests are about compare-and-swap, not validity):

```
$ bun --no-env-file test --env-file=scripts/test.env src/projects/git/manifest-cas.integration.test.ts
 9 pass
 0 fail
$ bun --no-env-file test --env-file=scripts/test.env src/projects/git/manifest-imports.integration.test.ts
 6 pass
 0 fail
```

Pre-existing: running those two files in ONE bun process times out
`allows credential-free absolute repositories only in local development`
(5 s) the same at origin/dev (`13 pass, 1 fail`); the db-suites lane
runs one file per process, where it passes.

DB-backed suites that write config (local Supabase, one migrated
database per file):

```
$ bash scripts/test.sh integration <89 files that drive config-write routes>
[db-suites] FAIL 88/89 suites, 1252 tests, 94.8s
[db-suites] FAIL apps/api/src/projects/config-summary/service.integration.test.ts: 11 failed
```

Pre-existing: `config-summary/service.integration.test.ts` stops at the
same git 2.45 fixture check, a read path.

Flows on the deterministic local API (they write kortix.yaml through the
real routes):

```
$ pnpm test -- --domain triggers,connectors,projects,agent-principals,channels,apps,change-requests,git,iam,cli,config-releases,secrets
results: 372/372 passed · 0 failed · 0 skipped · 0 todo · 129.9s
```

Before the `auth.secret` fix this run caught the gate refusing the
secret binding: `FAIL CONN-MCP-SECRET-1 … expected [200], got 422 …
connectors[0].auth.secret: auth.secret is no longer supported` (the
status was 422 at that head, now 409).

Live API (deterministic local stack, synthetic user and project with a
local git remote). A person pushes a file that already carries an error;
valid API writes still land:

```
head (pushed, carries an error): 4344a4b
--- valid trigger on a file that already has an error
HTTP 201
head after: 8e1db37 · weekly committed: 1
--- PATCH that disables it
HTTP 200
--- DELETE nightly-check (shifts list indexes)
HTTP 200
```

Real CLI process, the same validator:

```
$ kortix validate   # auth.secret: STRIPE_API_KEY
  ✓  kortix.yaml is valid
named exit=0
$ kortix validate   # auth.secret: sk_live_not_a_name
kortix.yaml:7:7  error  connectors[0].auth.secret  auth.secret must be the name of a project secret (^[A-Z_][A-Z0-9_]{0,63}$); its value lives in Secrets.
raw exit=1
```

T0: `pnpm typecheck` (kortix-api, manifest-schema) exit 0; `npx eslint`
on the changed API files exit 0; biome on the changed files: 12
diagnostics before and after (none added). apps/cli tests that read the
schema or validator: 70 pass, 0 fail.

Not verified: a live 409 from the gate on the current trunk's routes.
Every route validates its own input before the commit (since KRTX-5050
the trigger routes also run `addedManifestErrors`), and no input I tried
passed a route check but failed the gate. Before KRTX-5050 the real
PATCH route reached the gate (shown above); the envelope is proven
through the retry and the HTTP error mapping.

## Security & data review

- No new input, secret or permission. A refused write commits nothing
and changes no row.
- `auth.secret` holds a project-secret NAME (the value lives in
Secrets); a raw credential-shaped value is still rejected.
- Synthetic data only.

## Rollout / rollback

Rollout: ships with the next API deploy; `kortix validate` and the
published JSON schema change with the CLI and web builds. Rollback: `git
revert --no-edit <merge sha>`; no migration, no stored state.

## Reviewer checklist

- [x] Every hunk traces to KRTX-5043 (the `auth.secret` change is
required for the gate not to refuse the platform's own secret binding)
- [x] A test fails without the fix and passes with it
- [x] Response contracts unchanged (409 is declared on every config
route)
- [x] Pre-existing failures shown against origin/dev

Closes KRTX-5043

---------

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
## Demo video

No demo video: code-only change. Runtime release retention has no UI
change.

## Quick verification

Outcome: KRTX-5063 preserves historical immutable bootstrap paths across
config convergence and daemon restarts.

- Keep materialized release directories and manifests for the session
sandbox lifetime. Continue deleting staging entries.
- Exercise original absolute and symlink helper paths after three
releases and a fresh boot, with distinct synthetic triage/infra startup
values. These checks prove startup only, not business-pass completion;
no production loops were rerun.
- Reject unproven, unrelated, tampered and missing fallback data through
the existing boot verifier. Authentication gates and token handling are
unchanged; no replacement locator or writable-script fallback is
introduced.

**Risk:** medium — historical releases consume disk until sandbox
deletion. Retention prevents future deletion; it does not restore files
already deleted by an old daemon. Rollback restores the previous
collection rule and its stale-path risk. No schema, public export,
model, permission or schedule change.

**Verified:** targeted config tests 56 pass / 0 fail; real pi daemon
HTTP/runtime tests 286 pass / 0 fail; typecheck and lint exit 0;
architecture 237 pass / 0 fail; local SESS-51 1/1 passed. The initial
ordinary stack startup failed on a fresh Supabase schema; the targeted
flow then initialized migrations and exercised the local API
successfully.

Root cause: convergence kept only the newest two releases although
session history and bootstrap symlinks could still reference older
paths.

Interpretation: retaining releases for the sandbox lifetime is the
minimal safe retention fix. A pointer is not a script-execution
authorization mechanism. Existing verification remains responsible for
fallback selection.

<details><summary>Commands and actual output</summary>

```sh
# Before implementation: bash scripts/test.sh src/__tests__/pi-config-release.test.ts -t 'bootstrap paths survive'
0 pass
1 fail
# original helper was absent after the third release

# After implementation and after merging origin/dev:
bash scripts/test.sh src/__tests__/pi-config-release.test.ts src/__tests__/boot-config.test.ts src/__tests__/config-release-overlay-race.test.ts src/__tests__/config-release-routes.test.ts
56 pass
0 fail
256 expect() calls
Ran 56 tests across 4 files. [2.38s]

bash scripts/test.sh src/__tests__/config-release-api.test.ts src/__tests__/config-release-notice.test.ts src/__tests__/pi-harness.test.ts
286 pass
0 fail
1946 expect() calls
Ran 286 tests across 3 files. [27.13s]

bun run typecheck
$ tsgo --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsgo.tsbuildinfo
# exit 0
bun run lint
$ eslint src
# exit 0
bun run test:architecture
# tests 237
# pass 237
# fail 0

pnpm worktree start krtx-5063-bootstrap
supabase_rest_kortix-local unexpected status 503
# fresh local instance lacked schema kortix

pnpm test -- --id SESS-51
PASS SESS-51 2.2s
results: 1/1 passed · 0 failed · 0 skipped · 0 todo · 2.8s

curl --max-time 3 http://localhost:13008/v1/health
# status=ok service=kortix-api environment=dev commit=unknown

.agents/skills/learnings/scripts/index.sh --check
# exit 0
git diff --check
# exit 0
```
</details>

Caller boundary: `createPiConfigReleases` → `settleRelease` →
`pruneBootConfigs`; all production calls share that adapter. The only
alternate direct caller is the release-store test. Real synthetic helper
processes test both absolute and symlink entry points. The pi-harness
HTTP tests exercise the daemon adapter. SESS-51 is a local session API
smoke, not a hosted keyed-loop completion test.

Acceptance mapping: retention `boot-config.ts:685-700`; stale bootstrap
`pi-config-release.test.ts:388`; rejected fallback inputs
`pi-config-release.test.ts:205`; retained-content integrity and
missing-file rejection `boot-config.test.ts:289-325`. Paths are under
`apps/kortix-sandbox-agent-server/src/`.

Not verified: production deployment and production keyed business
passes. Package-wide suite intentionally not run under repository
AGENTS/testing rules; all directly naming tests and additional daemon
caller tests ran. No DB-backed test imports the changed helper; SESS-51
confirms the neighboring session API contract.

suna-skills: worktree, testing, learnings, contributing (+ attachments
and preview-environments references), create-pr
Self-review: 1 items found and fixed
ponytail: full · review: Lean already. Ship. · markers: 1
model=kortix/codex/gpt-6.1-sol route=code
reason=conservative-code-default

Closes KRTX-5063

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797848218&installation_model_id=434224&pr_number=12971&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12971&variant=proof_this_pr&signature=ce1049237268a8aa7669c0a1b244f58aa578882788e4d552e99b4f42c188c1bf"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-proof-this-pr-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-proof-this-pr-v2-light.svg"><img
alt="Proof this PR"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-proof-this-pr-v2-dark-3x.png"
width="121" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12971?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
…ner (#12973)

## Demo video

No video: the recording would show a real workspace sidebar. Cropped
screenshots of the two changed surfaces instead.

**Web, workspace home, 1440×900: the setup banner floats at the bottom,
names the open steps with a tinted logo stack, and opens the modal with
"Continue setup".**

![Setup
banner](https://github.com/user-attachments/assets/3bb699ad-246c-4f22-89a3-286d561eb53c)

**Web, `/workspaces/<id>/setup` (same URL, now a modal over home): open
steps first, two per row; finished steps collapse to one line.**

![Setup
modal](https://github.com/user-attachments/assets/c2903f87-1788-4f98-8cf0-37e065a14154)

## Quick verification

Outcome: workspace setup is a modal at the same URL, and the home banner
is a quiet floating bar with one snooze ("Later") instead of a ✕.

- **Banner** (`/workspaces/<id>` with an open step): bottom-center bar,
"5 setup steps are left", "Continue setup" (or "Start setup" when
nothing is done; "Connect GitHub to finish setup" when one step is
open).
- **Modal from the banner**: URL becomes `/workspaces/<id>/setup`, the
modal opens over home (intercepting route `@modal/(.)setup`). "Later"
closes it, returns to home and hides the banner for 24 h in this
browser. Escape and outside click only close.
- **Direct load** of `/workspaces/<id>/setup` (what `kortix onboard`
opens): home renders with the modal open; closing replaces the URL with
home. With the `chat` flag on, home no longer redirects to the space
while the modal is open.
- **Spaces**: "Move to space" (session ⋯ menu) and the composer's space
picker show each space's own icon and capitalised name, as the sidebar
does.
- **Promo card**: stays hidden below 1700 px on `/setup`, as on home, so
it no longer covers the banner.

Checked on the local worktree stack with agent-browser at 1440×900 on
the second commit: banner renders; banner → modal at `/setup` with home
behind; "Later" → home, modal and banner gone, snooze stored; direct
`/setup` load → modal over home, promo hidden; Escape → home, banner
still shown; space picker rows `No space | Artifact | New space`, each
with an icon.

```
pnpm --filter Kortix-Computer-Frontend typecheck     # 0 errors
bun test packages/ui/src/workspace/setup/setup-steps.test.ts   # 4 pass, 0 fail
bun test tests/unit/ui-deep-exports.test.ts          # 2 pass, 0 fail
pnpm --filter Kortix-Computer-Frontend i18n:catalogs # all 9 locales ok
.agents/skills/kortix-brand/scripts/audit.sh packages/ui/src/workspace/setup   # clean
```

Not affected: API, DB, SDK, mobile. The `@kortix/ui` deep export
`workspace/setup/workspace-setup-page` is renamed to
`workspace/setup/workspace-setup-modal`; its only importer is
`apps/web`. A dismissal saved by the old banner ✕ is ignored. Desktop
(Electron) not checked.

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797858032&installation_model_id=434224&pr_number=12973&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12973&variant=show_it_working&signature=f521f7b4c4f5139306bb0b98643f402c0ceb1343213062a040613149361f146e"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-show-it-working-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-show-it-working-v2-light.svg"><img
alt="Show it working"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-show-it-working-v2-dark-3x.png"
width="140" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12973?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
## Demo video

No demo video: code-only change. One generated documentation row; no
runtime or component change.

## Quick verification

Outcome: document `connectors[].auth.secret`, accepted by #12966, so the
generated manifest reference matches the published schema.

- `bun apps/web/scripts/generate-kortix-yaml-doc.mjs` adds the missing
row. No handwritten generator changes.
- Before fix: `kortix-yaml-doc.test.ts` had 2 failures in the
pre-promote run. After fix: `vitest run --config unit/vitest.config.ts
unit/kortix-yaml-doc.test.ts` → **3 passed, 0 failed**, 322 ms.
- `git diff --check` → exit 0. Frontend production build is running;
this draft must not merge before its result is checked.
- Pre-promote also found 2 `carry-web-static.test.ts` failures because
this sandbox's `cp` lacks `--update=none`. This documentation change
does not address that toolchain limit.
- Risk: low. Generated documentation only; no schema, API, permissions,
migrations, or configuration values change. Revert the one-line commit
to roll back.
- Self-review: 0 items found and fixed. The row matches the existing
schema description; generated output is idempotent. Independent G9
remains required.
- suna-skills: worktree, testing, learnings, contributing, create-pr,
kortix-release.
- ponytail: full · review: Lean already. Ship. · markers: 0

```sh
cd tests
/workspace/suna/tests/node_modules/.bin/vitest run --config unit/vitest.config.ts unit/kortix-yaml-doc.test.ts
Test Files  1 passed (1)
Tests  3 passed (3)
Duration  301ms
```

Build update: the first frontend build compiled successfully, then
failed prerendering `/llms-full.txt` because the sandbox inherited
non-URL SUPABASE_URL/BACKEND_URL values. A second build with explicit
local URL values is running; no production configuration was changed.
The remaining pre-promote flow-registry failures include the sandbox
coreutils 9.1 limitation. No Promote dispatch has been made.

Final build: `SUPABASE_URL=http://127.0.0.1:54321
BACKEND_URL=http://localhost:13008/v1
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_BACKEND_URL=http://localhost:13008/v1 pnpm --filter
Kortix-Computer-Frontend build` → exit 0, all static pages generated.
The earlier unconfigured build failure is a sandbox environment issue,
not a passing run. No local server or browser demo was run for this
generated row.

Factory tracking: KRTX-5066 — https://linear.app/kortix/issue/KRTX-5066.
Evidence gate remains held: existing focused test passes but no clean
suite-level result yet. Continue the existing branch; do not duplicate
this PR.

Evidence update (current, supersedes the earlier pending suite
statements): local GNU cp 9.5 resolves the sandbox-only coreutils
limitation. Ran the whole tests/unit registry suite on the PR tree:

```sh
PATH=/workspace/toolchain/bin:/usr/local/bin:$PATH pnpm --dir tests test:unit
Test Files  144 passed (144)
Tests  1121 passed | 8 skipped (1129)
Duration  24.48s
```

Generator check and `git diff --check` exit 0. No regression test added:
this generated row is already pinned by the existing synchronization
tests, which failed before regeneration. Independent G9 is still
required. Tracking: KRTX-5066. No partial product fix remains;
deployed-dev and release preflight on latest dev await merge.

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
## Demo video

**Web, `/settings` (Preferences overlay), 1440×900, signed in, names and
email masked to synthetic values: the sidebar now matches Workspace
settings. Watch the header band, the Back row, the search field (type
"lang", Enter opens Language & shortcuts, Escape clears) and the
workspace rows with their tiles.**

./output/pr/demo.mp4

| After |
| --- |
|
![after](https://github.com/user-attachments/assets/73e63897-76ff-46cd-9561-4ec174f455c6)
|

## Quick verification

Outcome: the Preferences sidebar uses the Workspace settings sidebar's
layout: a header band with the signed-in person, a `Back to app` row, a
`Search preferences` field, 32px menu-button rows, and one-line
workspace rows with the switcher's tile and the role trailing.

- Open Preferences (`⌘,` or `/settings`). The cursor is in `Search
preferences` on desktop. Type `sec`: only Security remains. Press Enter:
the Security pane opens. Press Escape: the field clears. Press Escape
again: Preferences closes.
- Scroll the rail with many workspaces: the bottom edge fades.
`FadedScrollArea` now also observes its content, so rows that load after
mount show the fade (verified: end fade opacity 0 → 1).
- Edit your name in Profile: the header band updates (one shared query,
`tabs/profile-query.ts`).
- Not affected: the content pane, routes, mobile two-screen flow (it
gains the same search field), API, data.
- Checks run on this branch: web `tsgo` 0 errors, `@kortix/ui` `tsgo` 0
errors, `settings-panel.test.tsx` + `connect-tabs.test.tsx` 46 pass / 0
fail, eslint 0 errors on changed files, `i18n-catalogs check` ok, brand
audit clean. Browser checked in light, dark, and at 390px.
- Not verified: the Electron shell. The header band overrides the macOS
`kx-overlay-sidebar-titlebar` right alignment with `justify-start!` and
keeps the traffic-light padding.


https://github.com/user-attachments/assets/aa6af1bb-f115-43a8-8c8a-d402d1e6b640

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797865542&installation_model_id=434224&pr_number=12976&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12976&variant=run_proof&signature=fd43bdeca3f74281add6dcbd2e483aa8cf4d088a97b248836cf3ccc057aaf0e4"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-v2-light.svg"><img
alt="Run Proof"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-v2-dark-3x.png"
width="102" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12976?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
…ng (#12977)

## Demo video

**Web, local stack, 1440×900, a new workspace with no flag override:
`/download` shows "Kortix in Chrome"; workspace menu → "Apps and
extensions" shows "Add to Chrome"; a direct visit to `/settings/chrome`
opens the Kortix in Chrome tab with its three steps.**


https://github.com/user-attachments/assets/daa761d6-a8be-4797-b2e2-39af889f1867

## Quick verification

Outcome: the Chrome Web Store published Kortix 1.0.1 on 2026-11-21. This
PR turns the product side on, so a person who installs it from the store
can use it in any kortix.com workspace.

- **Before:** the `chrome` flag was off by default and hidden. A store
user could sign in, but every attach answered 403 `feature_disabled`,
and the web showed no Chrome surface. Prod has 0 store connections so
far.
- **After:** the flag is on by default wherever the API serves
`/v1/chrome` (`KORTIX_CHROME_ENABLED`: dev, staging, prod; off on
self-host). A workspace that set it off stays off. "Add to Chrome" links
the listing from Settings → Kortix in Chrome, Apps and extensions, and
`/download`. `/docs/connect/chrome` is public (no `noindex`) and linked
from the guide and the CLI table. Error bodies and `kortix chrome ls`
name `/settings/chrome`.
- **Fix:** a direct visit to `/settings/chrome` (the link the API and
the CLI print) opened Profile, because the panel fell back before the
browser list answered. It now waits for the answer.
- **Removed:** the `CHROME_LAUNCHED` and `CHROME_STORE_LISTED` switches,
the "Load unpacked" install path, and 2 unused strings in 9 catalogs.
- **Checks run:** `pnpm test -- --id CHR-7` → 1/1 passed (flag off →
403; cleared → attach 200; Stop → 403 with `connectUrl`). Unit tests:
API 56 pass, CLI 8 pass, UI 17 pass, web 128 + 76 pass. Typecheck exit 0
for kortix-api, @kortix/cli, @kortix/ui, web, @kortix/shared. `pnpm
--filter kortix-api lint` clean, i18n catalog check ok, brand audit
clean. A new local workspace reads `chrome` as `enabled: true,
default_enabled: true`.
- **Not affected:** migrations, billing, mobile, the extension package
(no new store upload).
- **Risk:** every prod session gets the `kortix-chrome` skill and the
`kortix chrome` command. Rollback: revert this PR. Prod gets it with the
next release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797866609&installation_model_id=434224&pr_number=12977&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12977&variant=run_proof_on_this_pr&signature=1db18d2fda106f737e129a02fa17a5d72ca2c42227da197853782359795a488c"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-light.svg"><img
alt="Run Proof on this PR"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-dark-3x.png"
width="168" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12977?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
…at waits for a release (#12978)

## Demo video

No user-visible surface: this adds one learnings ledger entry and its
index line.

## Quick verification

Outcome: the ledger records the 2026-11-21 near-miss. Chrome Web Store
version 1.0.1 went public at review approval, before the product side
was on (fixed by #12977).

- Read
`.agents/skills/learnings/entries/2026-11-21T152442Z-turn-on-deferred-publishing-before-you-submit-a-store-build.md`.
- No code, test or deploy change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797866712&installation_model_id=434224&pr_number=12978&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12978&variant=start_proof&signature=6c6d15fc4435cf1eaab9e1e49347ecd40d7af3a13c1a182ba9dcbaed61f1d490"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-start-proof-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-start-proof-v2-light.svg"><img
alt="Start Proof"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-start-proof-v2-dark-3x.png"
width="108" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12978?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
@strix-security

strix-security Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Strix Security Review

Warning

This pull request has 21 commits after the last Strix review (69ebf81). Strix has not reviewed these changes.
Automatic review on push is off for this repository. To review the latest changes, tag @strix-security in a comment, or turn on re-review on push.

✅ No open security findings.

PR summary: Bumps the release to v0.16.4: it lets a pending CLI sign-in create its workspace inline, moves the workspace setup page into a modal with a floating home banner, allows `connectors[].auth.secret` to name a project secret in the manifest schema, and validates manifest writes before they are committed to the default branch.

Review summary

This release bundle adds an inline workspace-create step to the CLI authorization page, turns workspace setup into an intercepting-route modal, aligns the manifest schema with the runtime parser for connectors[].auth.secret, and adds a pre-commit validation gate for manifest writes. Every security-relevant change was traced end to end: connector credential resolution, the CLI mint/device-code approval server checks, the sandbox config-release boot and verification path, the access boundary around the new modal routes, and the before/after comparison the new write gate performs. All suspicions raised during the review were disproved on the code, so no vulnerability was filed.

Ruled out (6)
  • Can a repo-committed connector manifest name an existing project secret and point the connector at a host the author controls, so Kortix sends that secret's va…
    The runtime parser already accepted `auth.secret` before this change, and in this platform's permission model `project.gitops.push`/`gitops.merge` already imply `project.connector.write` and `project.secret.write`, so the manifest write does not cross a privilege boundary; the same credential redir…
  • Can the inline workspace create on the CLI authorization page mint an API key or approve a device code for a workspace or account the signed-in user is not a m…
    The created project's `account_id` is server-derived (the create payload carries no account) and both `POST /v1/accounts/tokens` and the device-code decision route re-check `account_members` for the account sent, returning 403 when the session user is not a member.
  • Does keeping every release directory in the sandbox config store let a stale, tampered or squatted release become the project root at boot or convergence?
    Boot still requires the API descriptor, or a proven pointer that resolves to exactly `releaseDir(root, release_id)` and passes `verifyRelease`, or the image default; release ids are content-derived and a mismatched on-disk copy is deleted and rebuilt, while staging artefacts are still pruned.
  • Do the new setup-modal routes render workspace setup data for a viewer who is not a member of that workspace, or drop a permission check the deleted page had?
    The `@​modal` slot is composed inside `ProjectAccessBoundary` in the workspace layout, so it only mounts after the workspace resolves, and the modal reuses the same `useProjectCan` connector/secret gates and the same capability-gated data hooks as the page it replaces.
  • Can a connector-supplied OAuth or connect-link URL reached from the new setup modal execute script in the app origin or redirect the user off-site?
    Both client navigation sinks are fed by server-returned values that must start with `https:​//` (the OAuth2 endpoint guard throws otherwise), and the modal's connector block is a verbatim move of the deleted page's code, which never touches those modules.
  • Can the new manifest write-validation gate be bypassed so an invalid configuration still reaches the default branch?
    Every manifest-editing route builds its file list through `manifestWrites`, which refuses before any write is prepared, its baseline is provably the document that was read, and the index normalization can only keep an error count equal, never raise it.

Review 1 on this PR · 69ebf81 · requested Nov 21 15:26 UTC when the PR was opened


Reviewed by Strix
Re-run review · Configure security review settings · Try a deeper review with @strix-security /deep

@github-actions

Copy link
Copy Markdown
Contributor Author

Tests - release attempt 2 ended failure: contract / packages-rest lane, full suite + quality gates. Rerunning it once: https://github.com/kortix-ai/CompanyOS/actions/runs/44919221278

A job that passes on the rerun is a flake. Fix it at the root or delete it the same day (the testing skill, No quarantine). A job that fails twice is real.

agent-kortix and others added 7 commits November 21, 2026 18:18
…12980)

## Demo video

No demo video: code-only change. Test route enumeration only; production
tab routing is unchanged.

## Quick verification

Outcome: stop treating Next.js parallel-slot and same-level interception
folder names as public URL segments in the desktop tab coverage test.
#12973 added the setup modal at `@modal/(.)setup`; the actual public
path stays `/setup`.

- Keep the existing per-page named-tab assertions, including the
intercepted setup page. Strip `@` slots and `(.)` from the sampled URL
rather than skipping the page or weakening the assertion.
- Added a regression for the actual setup folder shape and ordinary
route-group/dynamic-segment handling.
- Risk: low. Test-only. No runtime, permission, schema, or UI change.
Rollback: revert this test correction.
- Self-review: 0 items found and fixed. No new helper or dependency.
Independent G9 remains required.
- ponytail: full · review: Lean already. Ship. · markers: 0
- suna-skills: worktree, testing, learnings, contributing,
kortix-release.

```sh
bun test apps/web/src/features/desktop-tabs/tab-route.test.ts
# Before correction, with added regression:
41 pass
2 fail
# After correction:
43 pass
0 fail
85 expect() calls
Ran 43 tests across 1 file. [152.00ms]
```

Pending dependency installation: related tab tests and frontend
typecheck initially could not resolve react/tsgo in the new worktree.
Those are not passing checks; reruns follow installation. No local
server is needed for a test URL sampler; the release gate exercises the
package.

Final checks after dependency installation:
```sh
bun test apps/web/src/features/desktop-tabs/
100 pass
0 fail
230 expect() calls
Ran 100 tests across 3 files. [979.00ms]
pnpm --filter Kortix-Computer-Frontend typecheck
# exit 0
cd apps/web && /workspace/suna/node_modules/.bin/eslint src/features/desktop-tabs/tab-route.test.ts
# exit 0
git diff --check
# exit 0
```
The earlier unresolved dependency checks were replaced by the successful
reruns above. No package-wide suite was run (release-fix targeted
verification rule). No runtime adapter changed: the real filesystem
inventory and production tabRoute are exercised directly by the
corrected test. Self-review: 0 items found and fixed.

Closes KRTX-5067 — https://linear.app/kortix/issue/KRTX-5067

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
## Demo video

No video: this PR changes one encrypted value in `apps/api/.env.dev`,
and nothing on a screen.

## Quick verification

Outcome: `apps/api/.env.dev` holds the dev database password set on
2026-11-21, so `pnpm dev:dev-env` and every script that reads the file
connect to the dev database again.

- **Why:** the old dev database password was posted in a Slack message
in February. It was changed at Supabase on 2026-11-21 at 17:39 UTC
(`PATCH /v1/projects/<ref>/database/password` → `200`).
- **Done outside git:** AWS Secrets Manager `kortix-dev-env` and
`kortix-preview-env` (us-east-2) hold the new value. The dev API, worker
and gateway restarted on it between 17:39 and 17:44 UTC. Dev answers
normally: `/v1/health` ok, signed-in `/v1/accounts` → `200`.
- **Checked:** the decrypted file value equals the `kortix-dev-env`
value. A `select 1` with it succeeds. The old password is refused
(`28P01 password authentication failed`).
- **Scope:** only `DATABASE_URL` in `.env.dev` changes. Staging, prod,
the local stack and CI are not affected.
- **After merge:** pull `dev` before `pnpm dev:dev-env`. Delete any
machine-local `apps/api/.env.local` override that still holds the old
dev URL.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797875254&installation_model_id=434224&pr_number=12983&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12983&variant=see_it_in_action&signature=2376630a4224318f26a5cb206e68f1fe6f8f7129733ac93d3b6ad4fb6d2f8fd6"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-see-it-in-action-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-see-it-in-action-v2-light.svg"><img
alt="See it in action"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-see-it-in-action-v2-dark-3x.png"
width="132" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12983?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
…12980)

## Demo video

No demo video: code-only change. Test route enumeration only; production
tab routing is unchanged.

## Quick verification

Outcome: stop treating Next.js parallel-slot and same-level interception
folder names as public URL segments in the desktop tab coverage test.
#12973 added the setup modal at `@modal/(.)setup`; the actual public
path stays `/setup`.

- Keep the existing per-page named-tab assertions, including the
intercepted setup page. Strip `@` slots and `(.)` from the sampled URL
rather than skipping the page or weakening the assertion.
- Added a regression for the actual setup folder shape and ordinary
route-group/dynamic-segment handling.
- Risk: low. Test-only. No runtime, permission, schema, or UI change.
Rollback: revert this test correction.
- Self-review: 0 items found and fixed. No new helper or dependency.
Independent G9 remains required.
- ponytail: full · review: Lean already. Ship. · markers: 0
- suna-skills: worktree, testing, learnings, contributing,
kortix-release.

```sh
bun test apps/web/src/features/desktop-tabs/tab-route.test.ts
# Before correction, with added regression:
41 pass
2 fail
# After correction:
43 pass
0 fail
85 expect() calls
Ran 43 tests across 1 file. [152.00ms]
```

Pending dependency installation: related tab tests and frontend
typecheck initially could not resolve react/tsgo in the new worktree.
Those are not passing checks; reruns follow installation. No local
server is needed for a test URL sampler; the release gate exercises the
package.

Final checks after dependency installation:
```sh
bun test apps/web/src/features/desktop-tabs/
100 pass
0 fail
230 expect() calls
Ran 100 tests across 3 files. [979.00ms]
pnpm --filter Kortix-Computer-Frontend typecheck
# exit 0
cd apps/web && /workspace/suna/node_modules/.bin/eslint src/features/desktop-tabs/tab-route.test.ts
# exit 0
git diff --check
# exit 0
```
The earlier unresolved dependency checks were replaced by the successful
reruns above. No package-wide suite was run (release-fix targeted
verification rule). No runtime adapter changed: the real filesystem
inventory and production tabRoute are exercised directly by the
corrected test. Self-review: 0 items found and fixed.

Closes KRTX-5067 — https://linear.app/kortix/issue/KRTX-5067

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
test(web): carry reviewed tab route sampler fix to staging (KRTX-5067)
…ish and opacity (#12985)

## Demo video

No video: the change is visual and static per state, so screenshots show
it. Captured from this branch's local stack in headless Chromium on a
Metal GPU.

**Settings → Appearance → Wallpaper, dark: a preset's palette popover
(palettes, colors, finish, opacity, reset).**

![Palette
popover](https://github.com/user-attachments/assets/d9498f21-6a63-43ab-a74f-389783ee3fb0)

**The ten gradient presets, dark and light.**


![Presets](https://github.com/user-attachments/assets/e1f6d640-cb24-4409-bf8d-9915ea3d8adf)

**Custom → Shuffle, four rolls: a new shape, finish and palette each
time.**


![Shuffle](https://github.com/user-attachments/assets/9305caed-21f7-4856-94ce-ce0fac23b4b2)

## Quick verification

Outcome: the wallpaper picker offers Dither (default), ten colored
gradients, Blank and Custom. Every gradient card has a palette button
for its colors, Dither or Grain, and opacity (default 50%). Custom also
has Shuffle.

- Open Settings → Appearance → Wallpaper. Hover a gradient card and
click its palette button. Pick a palette, change a swatch, switch Grain,
drag Opacity. The page wallpaper updates live. Reset returns the preset
as shipped.
- Click Shuffle on Custom: the shape, finish and colors change, never
repeating the shape.
- Performance, measured on the local stack: the canvas is at most 1 MP
(720×450 for 1440×900 at DPR 2; 1280×720 at 4K), at most 30 draws per
second, 0 frames over 20 ms and 0 long tasks in 6 s. A 4 s color drag
drew 121 times (cap 120), 0 long tasks. Reduced motion draws one still
frame. Opacity is CSS, not a redraw.
- Retired wallpapers (Brandmark, Pixel Beams, Silk, Grain, Neuro) still
render by id for marketing and the exporter. A stored retired id shows
Dither.
- Not affected: migrations, API, SDK, mobile, desktop shell code. Not
tested: an integrated GPU or a phone, and the authed Settings modal
(tested with the same `Modal` component on a scratch route).

```
pnpm --filter Kortix-Computer-Frontend typecheck          # 0 errors
(packages/ui) pnpm typecheck                              # 0 errors
(packages/ui) pnpm test src/theme/wallpapers.test.ts src/primitives/project-icon-picker.test.tsx   # 24 pass, 0 fail
pnpm --filter Kortix-Computer-Frontend test <8 files: appearance-tab, localized-copy, menu-registry, command-palette, wallpaper-downloads, i18n-complete, client-catalog, project-icon-field>   # 147 pass, 0 fail
(tests) vitest unit/brand-kit.test.ts                     # 7 pass
.agents/skills/kortix-brand/scripts/audit.sh <touched files>   # clean
```

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797876172&installation_model_id=434224&pr_number=12985&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12985&variant=run_proof_on_this_pr&signature=f622135c57599815a490370e9252d8664f3614f4291c0704c7888a7bc2fbd8bb"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-light.svg"><img
alt="Run Proof on this PR"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-dark-3x.png"
width="168" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12985?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
## Demo video

A toast on the session page, 1000 × 760 window, with the docked
composer:

![Toast in the bottom-right corner](./toast-corner.png)

## Quick verification

- Removed `toast-clearance.ts`. It lifted every toast above the composer
whenever the composer reached into the window's right 380 px. The
`<Toaster>` now uses Sonner's default 24 px edge offset on every page.
- Proof on the worktree stack (session page, "Copy session link"): the
toast measured `right: 976, bottom: 736` in a 1000 × 760 window (24 px
from each edge). `--toast-offset-bottom` is unset.
- `pnpm --filter @kortix/ui typecheck` and `pnpm --filter
Kortix-Computer-Frontend typecheck`: 0 errors. eslint on the touched
files: 0 errors.
- Tradeoff: on a narrow window the toast can sit over the Send button
until it times out or is dismissed.


![toast-corner](https://github.com/user-attachments/assets/ae5c8792-4892-4a87-aee1-cea677f72171)

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797876450&installation_model_id=434224&pr_number=12987&ref=codesmith_pr_footer&repository=kortix-ai%2FCompanyOS&return_to=https%3A%2F%2Fgithub.com%2Fkortix-ai%2FCompanyOS%2Fpull%2F12987&variant=proof_this_pr&signature=88792c798e83e9d5cb85128308e8dcdd0e3c2d59e70e51e01efbf32e8d6c88e1"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-proof-this-pr-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-proof-this-pr-v2-light.svg"><img
alt="Proof this PR"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-proof-this-pr-v2-dark-3x.png"
width="121" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/kortix-ai/codesmith/CompanyOS/pr/12987?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
agent-kortix and others added 7 commits November 21, 2026 20:33
…KRTX-5070) (#12770)

## Review in 60 seconds

Closes KRTX-5070 (the #kortix-triage thread of 2026-11-16: "refactor &
fix this", then the follow-up ask to show no errored outputs at all).

- **Problem:** an agent called `show` with a URL and no `type`. pi
accepted the call, the tool threw `'type' is required…`, the model
retried with `type:'url'`, and the transcript merged both calls into one
card that opened on the failed tab: an error line above a 420px empty
box, with "Open" pointing at the failed call.
- **Explicit-type contract:** `KortixTool` gains an optional
`validate(args)`. pi runs it as `prepareArguments`, before its schema
check, the permission gate and execute. `show`'s validate refuses
invalid `items` and a single item whose `type` is missing, `''` or
`null`, with an error naming `type='url'` and `items`. Execute runs the
same check for direct and ejected calls. `type` is an enum. No top-level
`anyOf`: provider tool APIs document top-level combinators as
unsupported (not tested live).
- **A failed show is never presented** (the owner's ask in the thread):
the SDK's shared visibility rule `isInvisibleActivityPart` names a
failed `show`/`show_user` call, so transcript segmentation (web and
mobile), burst steps, the Actions panel, Easy panel lists and details
and direct renders draw nothing for it. Next to its retry only the retry
remains, with no tabs; an all-failed group renders no card; a detail
opened while a show ran closes when it fails (also for the
`oc-`-prefixed alias, through the same `normalizeActivityToolName` the
visibility rule uses). A running show stays until it settles. Errors
from other tools keep their cards. The failed call stays in the session
log and the model's context. A carousel of link cards no longer reserves
the 420px media slot.


https://github.com/user-attachments/assets/2ce7d3e3-5943-40ab-ac71-af0f1546a114

**Walkthrough** (`/en/debug/tools` on this branch, merged with
`origin/dev` at c149cd8, synthetic `example.test` fixtures)
1. 1440 wide: "show (failed call, then its retry)" is one compact link
card; "show (every call failed: nothing is drawn)" draws nothing; "show
(error)" (a successful show of error content) keeps its card ![Step
1](https://github.com/user-attachments/assets/f17a8679-76f5-4c5d-9d9e-371efbfa1ab5)
2. 390 wide (phone width): the same rows ![Step
2](https://github.com/user-attachments/assets/bdb8c24a-a4f8-4795-9ed3-12d0aeb69865)

**Risk:** low. Only how `show` calls are presented changes, plus an
optional tool-contract field no other tool uses. The branch keeps its
pre-issue name `show-validation-recovery`: renaming a PR's head branch
closes the PR on GitHub (tried, reopened at once), so KRTX-5070 is in
the title and body.
**Verified:** feedback cycle 2 (head 6ab14d3): mobile version bumped
1.6.48 → 1.6.49 with `node apps/mobile/scripts/set-version.mjs --next`
(all six copies: app.json version + runtimeVersion, Info.plist,
Expo.plist, build.gradle, strings.xml; origin/dev is 1.6.48), mobile
`bun test --isolate scripts/set-version.test.ts
lib/session/turn-body.test.ts` 90 pass / 0 fail. Feedback cycle 1 (head
48fc71e): ui targeted 109/0 (+2 `oc-show` cases; the new `oc-show`
failure case fails without the fix: 12 pass / 1 fail), ui `pnpm test`
9600/0 before the origin/dev merge and 9604 pass / 4 fail after it
(Pre-existing: the 4 — `skill.test.ts` ×2, `module-cycles.test.ts`,
`code-theme.test.ts` — fail the same at origin/dev 8fb2d70), ui
typecheck exit 0 before and after the merge, eslint exit 0 on the
changed files, sdk targeted 111/0. Earlier on d00aaf8: targeted
server 84/0, sdk 111/0, ui 107/0, mobile 79/0, cli embedded 2/0; the new
tests fail with the production hunks reverted to origin/dev. Whole
suites: sdk 7454/0, ui 9598/0, server 1980 pass / 2 fail (pre-existing,
identical at origin/dev). Typecheck passes for sandbox-agent-server,
sdk, ui, web and cli; mobile fails once in an untouched file, identical
at origin/dev. eslint 0 errors on the changed files. `/en/debug/tools`
driven with agent-browser at 1440 and 390 wide. Not run: the full local
stack (`pnpm worktree start` stops at "primary Supabase credentials are
unavailable"), a live provider request, a native mobile build.
suna-skills: worktree, testing, learnings, contributing, sdk,
kortix-design-system (read)
ponytail: full · review: show-group-renderer.tsx:L29 shrink: cast on the
merged input replaced by the calls' own status, applied; Lean already.
Ship. · markers: 0
Self-review: 3 items found and fixed (the missing mobile version bump,
G9 cycle 2; an added cast in `show-group-renderer.tsx`; added `any` in
`validate`/`parsedItems`/`callError`, now `Record<string, unknown>`);
feedback cycle: 0 further items
Feedback: 1 addressed · 0 answered without a change (G9 item 1:
`use-panel-handoffs.tsx` compared the raw tool name, so a failed
`oc-show` left its detail open; fixed in 34d54d9)
Routing: model=claude-agent/opus route=visual reason=route-label

## Summary

Before: a single `show` item without `type` passed pi's pre-execution
check and failed inside the tool; when the agent's retry succeeded, the
merged card still opened on the failure as a mostly empty box. After:
the harness refuses that call before the permission gate and execute,
with an actionable error, and a failed `show` call is never drawn: the
retry that worked is the only card. Nothing is deleted from the session
log or the model's context.

## Demo video


https://github.com/user-attachments/assets/2ce7d3e3-5943-40ab-ac71-af0f1546a114

**Web, `/en/debug/tools`, 1440×900 then 390×844, synthetic data.
Recorded on this branch after merging origin/dev.**

## Type of change

- [x] Bug fix
- [ ] New feature
- [ ] Refactor

## What is affected

- **Agents:** the `show` schema (`type` enum, descriptions), its new
pre-execution `validate`, and the error text. The CLI's embedded tool
copy (`apps/cli/src/kortix-tools.generated.json`) is regenerated.
- **Tool contract (`KortixTool`):** an optional `validate`. A tool
without it runs exactly as before.
- **Every presentation surface** (the web and mobile transcripts, burst
steps, the Actions panel, Easy panel lists and details, direct tool
renders): a failed `show` call renders nothing, and a carousel of link
cards has no 420px floor.
- **`@kortix/sdk`:** `isInvisibleActivityPart` names a failed show, so
`segmentTurn` and `groupSteps` drop it, and `showGroupItems` no longer
emits `error` items. Two older tests that asserted a failed show is
visible now assert the opposite. `developers.mdx` is updated to match.
The `ShowGroupItem` type is unchanged, `'error'` stays in its union so
the published type doesn't narrow, and no export changed.
- **`/debug/tools`:** registers the tool renderers (before, every row
rendered the generic card) and adds two fixtures.
- **Not affected:** the session log and its data, the model's context,
errors from other tools, artifact creation.

## How was this tested?

Feedback cycle (G9 item 1, head 48fc71e = 34d54d9 merged with
origin/dev). The demo is unchanged: the fix only affects the `oc-show`
alias, which the debug page does not render differently; `show` behaves
exactly as recorded.

Red first: `session-boot-body.test.tsx` now runs the show-detail
lifecycle for `show` and `oc-show` (`describe.each`). Before the fix:

```
$ cd packages/ui && bun test --isolate src/session/panel/session-boot-body.test.tsx
(fail) a oc-show detail opened while it runs (2026-11-16: failed shows are not presented) > the show fails (the panel lists drop it): its detail closes
 12 pass
 1 fail
Ran 13 tests across 1 file.
```

After (`rememberShow` normalizes the name with
`normalizeActivityToolName`, the same function `isInvisibleActivityPart`
uses):

```
$ cd packages/ui && bun test --isolate src/session/panel/session-boot-body.test.tsx
 13 pass
 0 fail
Ran 13 tests across 1 file.
$ cd packages/ui && bun test --isolate src/session/panel/session-boot-body.test.tsx src/session/panel/easy/detail-view.test.tsx src/session/panel/shared/easy-collector-group-steps.test.ts src/session/tool/shared/infrastructure.test.tsx src/session/tool/show-group-renderer.test.tsx src/session/tool/tool-part-renderer.test.tsx
 109 pass
 0 fail
Ran 109 tests across 6 files.
$ cd packages/ui && pnpm test
 9600 pass
 0 fail
Ran 9600 tests across 870 files. [509.71s]
$ cd packages/ui && pnpm typecheck   # tsgo --noEmit
exit 0
# after merging origin/dev (head 48fc71e):
$ cd packages/ui && pnpm typecheck
exit 0
$ cd packages/ui && pnpm test
 9604 pass
 4 fail
Ran 9608 tests across 869 files. [517.85s]
# Pre-existing: the same 4 fail at origin/dev 8fb2d70 (files untouched by this PR)
$ cd packages/ui && bun test --isolate src/skill.test.ts src/module-cycles.test.ts src/internal/lib/code-theme.test.ts   # head and origin/dev alike
(fail) kortix-ui skill > Components table names every export of src/theme/index.ts
(fail) kortix-ui skill > references/modules.md names every export of @kortix/ui/theme
(fail) module layers > no file imports a higher layer outside KNOWN_UPWARD
(fail) no second palette > no source file names a Shiki theme other than min-dark / min-light
$ cd packages/ui && npx eslint src/session/panel/shared/use-panel-handoffs.tsx src/session/panel/session-boot-body.test.tsx
exit 0
$ cd packages/sdk && bun test src/core/turns/segments/{session-activity-groups,show-group,segment-turn,group-steps}.test.ts src/core/session-log/turns/segments.test.ts
 111 pass
 0 fail
Ran 111 tests across 5 files.
```

Every other changed UI path already decides through the SDK rule
(`isUnpresentedFailure` → `isInvisibleActivityPart`, which normalizes);
`use-panel-handoffs.tsx` was the only raw `name === 'show'` comparison
in the diff.

Earlier cycle:

Targeted tests (re-run on head d00aaf8, merged with origin/dev; same
counts on fa517b4):

```
$ cd apps/kortix-sandbox-agent-server && bun test src/__tests__/kortix-tools.test.ts
 84 pass
 0 fail
Ran 84 tests across 1 file. [1.89s]
```

```
$ cd packages/sdk && bun test src/core/turns/segments/{session-activity-groups,show-group,segment-turn,group-steps}.test.ts src/core/session-log/turns/segments.test.ts
 111 pass
 0 fail
Ran 111 tests across 5 files. [157.00ms]
```

```
$ cd packages/ui && bun test src/session/panel/session-boot-body.test.tsx src/session/panel/easy/detail-view.test.tsx src/session/panel/shared/easy-collector-group-steps.test.ts src/session/tool/shared/infrastructure.test.tsx src/session/tool/tool-part-renderer.test.tsx src/session/tool/show-group-renderer.test.tsx
 107 pass
 0 fail
Ran 107 tests across 6 files. [2.39s]
```

```
$ node apps/mobile/scripts/set-version.mjs --next
1.6.49  app.json
1.6.49  app.json
1.6.49  ios/Kortix/Info.plist
1.6.49  ios/Kortix/Supporting/Expo.plist
1.6.49  android/app/build.gradle
1.6.49  android/app/src/main/res/values/strings.xml
$ cd apps/mobile && bun test --isolate scripts/set-version.test.ts lib/session/turn-body.test.ts
 90 pass
 0 fail
Ran 90 tests across 2 files. [542.00ms]
$ cd apps/mobile && bun test lib/session/turn-body.test.ts
 79 pass
 0 fail
Ran 79 tests across 1 file. [223.00ms]
```

```
$ cd apps/cli && bun test src/__tests__/kortix-tools-embedded.test.ts
 2 pass
 0 fail
```

Red before the fix: with every production file of this PR checked out
from origin/dev (tests kept), the new tests fail for the stated reason:
the six server explicit-type tests; sdk `isInvisibleActivityPart`,
`groupShowSegments`, `showGroupItems`, `groupSteps`, `segmentTurn` and
`sessionLogShowGroupCall` (failed call and its retry); ui
`ShowGroupRenderer` (retry only, all-failed renders nothing, link-card
carousel without the 420px floor), the open-detail-closes test,
`ToolParts`, `collectAllToolCalls` and
`shouldShowToolPartInActionsPanel`; mobile `turnSegments` (`78 pass / 1
fail`). With only the all-failed guard in `show-group-renderer.tsx`
removed: `13 pass / 1 fail` ("a group whose every call failed renders
nothing").

| Command / scenario | Result | Notes |
| --- | --- | --- |
| sdk `bun run test` | 7454 pass / 0 fail | |
| ui `pnpm test` | 9598 pass / 0 fail | |
| sandbox-agent-server `pnpm test` | 1980 pass / 2 fail | Pre-existing:
`pi-claude-agent.test.ts` (checksum download) and
`harness-boundary.test.ts` (host controllers) fail the same at
origin/dev (19 pass / 1 fail and 2 pass / 1 fail with this PR's files
reverted) |
| typecheck: sandbox-agent-server, sdk, ui, cli | PASS | |
| typecheck: web (`tsgo --noEmit`) | PASS | `pnpm typecheck`'s fumadocs
step needs Node ≥ 22.18 for a `.ts` import; generated with bun, then
`tsgo` |
| typecheck: mobile | FAIL, pre-existing | Only
`components/session/ProjectScreen.tsx(996,9)` `openSpringConfig`; fails
the same at origin/dev |
| eslint on changed files (ui, web debug page, server) | 0 errors | 4
warnings in ui files |
| `/en/debug/tools` on the worktree web dev server, 1440 and 390 wide |
PASS | Video and screenshots above. The dev overlay's one hydration
warning comes from `packages/ui/src/markdown/code/code-block.tsx`
(`HighlightedCode`), which this PR does not touch |

Not verified:
- A real agent session on the full local stack: `pnpm worktree start`
stops at "primary Supabase credentials are unavailable" (the local
Postgres has no `kortix` schema).
- A live provider request carrying the new enum.
- A native mobile build: only the shared segmentation is tested.

Earlier history of this PR (before KRTX-5070 was filed): independent
review approved c6ba466 after four rounds of request_changes, all
fixed. This cycle merged origin/dev (clean) and added the two
self-review fixes above.

## Security & data review

No auth, secrets or customer data are involved. Failed shows are hidden
only in presentation; no data is deleted. Fixtures use synthetic
`example.test` URLs.

## Rollout / rollback

- A failed `show` disappears from every UI surface, including the
Advanced panel. The session log keeps it, and the agent sees the error
in its context.
- `type` carries an `enum`; I have not tested it against a live
provider.
- Rollback: revert this PR.

## Reviewer checklist

- [ ] The explicit-type contract matches across the schema, the
descriptions, `validate`/`prepareArguments`, execute and the tests
- [ ] Failed shows are hidden on every presentation surface
(`isInvisibleActivityPart`, `ToolPartRenderer`), and nothing is removed
from the session log
- [ ] Streaming: a running show stays visible; a settled failure
disappears

---------

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
…(KRTX-5085) (#12988)

## Review in 60 seconds

- **What changed:** Workspace settings › Repository no longer draws its
own big "Repository" heading above the file browser (added in #12752).
The browser's toolbar is the page header again, and its title reads
"Repository", the same word as the settings menu. The branch picker,
history, Proposed changes and ⋯ stay where they were.
- **One opener:** inside settings, the toolbar no longer draws a second
"Open sidebar" button. The settings title bar owns the only opener, so a
collapsed sidebar shows one control instead of two.
- **Why:** a #kortix-triage report (Nov 19) flagged three regressions in
Workspace settings: left-aligned content, two menus, and this heading.
#12766 (KRTX-4951, merged Nov 20) already fixed the first two. The new
spec 58 run below confirms those are fixed on `dev`, and this PR fixes
the heading. Closes KRTX-5085.
- **Demo video:**
https://github.com/user-attachments/assets/b19921e0-91a1-4391-acb7-04d118deb697.
Walkthrough: Security (centered column, one settings nav) → click
Repository (toolbar titled "Repository", no heading above it) → collapse
the sidebar (one opener, in the title bar) → reopen → phone width
(section strip plus toolbar).

**Risk:** low. The change is web layout only: `ProjectPageHeader`
changes only inside the settings title provider (Repository, and Apps
when that host section is on, which also had no page title in settings
before). Every standalone page (Files, Goals, Spaces, Calendar, Inbox,
Artifacts) renders outside the provider and is unchanged. No API, data
or migration change. Not run: the native Electron journey
(`E2E_DESKTOP_NATIVE=1`), because this sandbox has no display. The
changed row sits below the settings title bar, never in the
window-control band.
**Verified:** spec 58 "one sidebar opens and closes" against this
worktree's local stack: red on `dev` code (the toolbar has no h1; the
failure screenshot shows the separate heading), green on this head (`1
passed (3.7m)`). `@kortix/ui`: 11 test files that name the changed
modules, `72 pass, 0 fail`. `tsgo` exits 0 for `@kortix/ui`, `tsc` exits
0 for `tests`, eslint and the brand audit are clean on the changed
files.
suna-skills: worktree, testing, learnings, contributing, create-pr,
kortix-brand, kortix-design-system, agent-browser
ponytail: full · review: Lean already. Ship. · markers: 0
Self-review: 1 items found and fixed
model=claude-agent/opus route=visual reason=worker-discovery-reroute
founder_review: no

## Demo video

**Web, Workspace settings, local stack, 1440×900 then 390×844 (synthetic
workspace "Demo Studio").**


https://github.com/user-attachments/assets/b19921e0-91a1-4391-acb7-04d118deb697

**Walkthrough**
1. Before, on `origin/dev` code: a separate "Repository" heading sits
above the toolbar, and the toolbar's left side is empty. ![Before:
separate
heading](https://github.com/user-attachments/assets/96935d6d-750b-4469-b8de-24a0f84d2444)
2. Security: the column is centered and the sidebar holds the only
settings nav (#12766, unchanged). ![Security,
centered](https://github.com/user-attachments/assets/8da01dfc-4fce-46da-adb4-bc9669b0d443)
3. Click Repository: the toolbar is the page header, titled
"Repository", with no heading above it. ![Repository, one
header](https://github.com/user-attachments/assets/3280c903-46ef-4b1a-91ac-522e5b011fbc)
4. Collapse the sidebar: one opener, in the Workspace settings title
bar. ![Collapsed, one
opener](https://github.com/user-attachments/assets/3c126a66-4347-4817-a08d-43e7e34887bb)
5. Phone width: the section strip and the toolbar, with no extra
heading.
![Phone](https://github.com/user-attachments/assets/529339b5-a245-4ff9-a18b-f5defe81372a)
6. Dark theme, sidebar open.
![Dark](https://github.com/user-attachments/assets/c496d64f-e4b8-4a7d-91a1-fe2ffc37aabb)

## Quick verification

- Outcome: Repository in Workspace settings has one header, the toolbar
titled "Repository", and the page has one sidebar opener. The centered
columns and single settings nav from #12766 hold (spec 58).
- **Root cause:** #12752 hid the toolbar's h1 inside settings
(`project-page-header.tsx`) and drew a separate `SettingsPageHeader` for
`repo` in `project-admin-dashboard.tsx`. This PR deletes that block and
has the toolbar's h1 read the settings rail word
(`useSettingsPageTitle()`). The page keeps finding 19's rule of one h1
equal to the nav label.
- **Try it:** open `/workspaces/<id>/admin/repo`. Expected: one toolbar
row titled "Repository" with the branch picker on the right. Collapse
the sidebar: one "Open sidebar" button, in the title bar.
- **Regression test:** spec 58 gains the step "Repository: the toolbar
names the page, no second heading or opener". The unit test in
`settings-page-header.test.tsx` now asserts that the toolbar's h1 reads
"Repository" inside settings and "Repo" outside.

<details><summary>How was this tested? Commands and real
output</summary>

```text
$ /workspace/out/run-58.sh   # spec 58 -g "one sidebar", local stack :13000/:13008, source fix reverted (origin/dev code)
  1) ... › one sidebar opens and closes, and every page centers its column › Repository: the toolbar names the page
    Error: expect(locator).toHaveText(expected) failed
    Locator: locator('main .kx-titlebar-row h1')
    Expected: "Repository"
    Error: element(s) not found
  1 failed

# origin/dev code, sidebar collapsed on admin/repo (agent-browser eval):
["Pin sidebar:true","Open sidebar:true","Open sidebar:true"]   # two openers

$ /workspace/out/run-58.sh   # this head
  1 passed (3.7m)

$ pnpm --filter @kortix/ui test <11 files: settings-page-header, project-page-header, drive-header, settings-section-header, settings-nav-context, connectors-page.chunk, workspace-inbox, section-wrapper, project-admin-sections, sidebar-context, project-home>
 72 pass
 0 fail
Ran 72 tests across 11 files. [2.69s]

$ bun test src/workspace/admin/settings-page-header.test.tsx   # before the fix
(fail) Workspace settings page header > the Repository toolbar is the page header: ...
 8 pass
 1 fail

$ cd packages/ui && pnpm typecheck            # tsgo --noEmit
exit 0
$ cd tests && npx tsc --noEmit -p .
exit 0
$ cd packages/ui && npx eslint src/internal/layout/project-page-header.tsx src/workspace/admin/project-admin-dashboard.tsx src/workspace/admin/settings-page-header.test.tsx
exit 0
$ bash .agents/skills/kortix-brand/scripts/audit.sh <changed tsx files>
✓ clean — every value came from the allowlist.
```

After merging `origin/dev` (8472783), the 11 unit files ran again
with the same result: 72 pass, 0 fail.
Not run: the native Electron journey (no display in this sandbox).

</details>

---------

Co-authored-by: Kortix Agent <292857086+agent-kortix@users.noreply.github.com>
@DimitrijeGlibic DimitrijeGlibic changed the title Release v0.16.4 — Create a workspace during CLI sign-in, with simpler workspace setup and safer config updates Release v0.16.4 — Kortix in Chrome, colored wallpapers, and workspace setup from the CLI Nov 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Tests - release attempt 2 ended failure: contract / core-flows lane, contract / packages-rest lane, full suite + quality gates. Rerunning it once: https://github.com/kortix-ai/CompanyOS/actions/runs/44964438927

A job that passes on the rerun is a flake. Fix it at the root or delete it the same day (the testing skill, No quarantine). A job that fails twice is real.

@github-actions

Copy link
Copy Markdown
Contributor Author

Tests - release attempt 2 ended failure: contract / core-flows lane, contract / packages-rest lane, full suite + quality gates. Rerunning it once: https://github.com/kortix-ai/CompanyOS/actions/runs/44968587408

A job that passes on the rerun is a flake. Fix it at the root or delete it the same day (the testing skill, No quarantine). A job that fails twice is real.

@DimitrijeGlibic DimitrijeGlibic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Release suite green on 06656e8 (run 44968587408). Approved by the releaser.

@DimitrijeGlibic
DimitrijeGlibic merged commit cee7629 into prod Nov 22, 2026
43 of 46 checks passed
@DimitrijeGlibic
DimitrijeGlibic deleted the release/v0.16.4 branch November 22, 2026 01:19
Sign up for free to 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.

3 participants