Skip to content

v0.7.53: sandboxes, settings consolidation, code hygiene - #6209

Merged
waleedlatif1 merged 11 commits into
mainfrom
staging
Aug 3, 2026
Merged

v0.7.53: sandboxes, settings consolidation, code hygiene#6209
waleedlatif1 merged 11 commits into
mainfrom
staging

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

icecrasher321 and others added 10 commits August 2, 2026 10:21
…ols (#6191)

* fix(copilot): secrets injection into sandbox

* improvement(chat): secrets mounting / exposure improvements and controls

* fix(secrets): simplify copilot mounting flow

* test(secrets): preserve standard tool permissions

* fix(copilot): bind workflow tool completions

* fix(secrets): preserve own environment keys

* fix(copilot): release failed workflow claims

* fix(copilot): trust compacted workflow completion
…eys (#6195)

* improvement(misc): settings organization, chat agent deploy request keys

* fix subtitle

* adjust perms
…aragraph explosion / reflow) (#6198)

parseMarkdownToDoc now strips ALL top-level empty paragraphs (leading, interior, trailing),
not just trailing. A run of blank lines between blocks is insignificant in markdown
(CommonMark collapses it), but @tiptap/markdown reconstructs one empty paragraph per blank
line — which made the mounted editor render vertical gaps that exist nowhere else the file
is viewed (GitHub, download, our own static preview), let a pathological blank run explode
into thousands of empty nodes, and caused the visible reflow on open (static preview
collapses empty <p>; the live editor gives each a trailing-break line). Collapsing on parse
keeps normal one-blank-line spacing, matches every standard renderer, and stays idempotent
so the round-trip-safety probe still reaches a fixed point (files stay editable; existing
files normalize on next cold-open + save). Serializer is intentionally NOT changed — a
global blank-run collapse there would corrupt blank lines inside fenced code blocks.
…i-editor, undo, persist round-trip) (#6199)

* test(files): two-writer concurrent-editing regression coverage for agent streaming

* test(files): multi-editor + undo + persist round-trip + late-joiner streaming integration coverage

* test(files): make full-rewrite two-writer test actually exercise the concurrent peer edit

* test(files): assert every peer edit lands (no false-green from a no-op peerInsertNear)
…#6202)

* improvement(settings): consolidate resource UI onto shared primitives

Sandboxes, MCP tools, and MCP servers each modeled their list rows and
detail headers differently. Collapse them — and the surfaces they drifted
from — onto one set of primitives.

SettingsResourceRow now owns the row entirely: tile, title/subtitle tokens,
padding and bleed, hover band, hit area, focus ring, and the one navigation
chevron. Adds onClick/href (a stretched overlay, so interactive trailing
controls keep their clicks), navigable, iconVariant='custom', and a badge
slot for decoration that must not swallow row clicks.

Rows that open a detail page get a chevron and a whole-row click; flat
records keep the "..." menu. Delete moves to the detail header as a
destructive chip behind a confirm modal — sandboxes previously deleted with
no confirmation at all.

Also folds in SettingsField (new), SettingsEmptyState tone='error',
RESOURCE_LIST_STACK/GRID, RESOURCE_TILE_PLAIN, and a shared MemberAvatar;
deletes DetailIconTile (byte-identical to ResourceTile); and standardizes
on the emcn ArrowRight, which is a visibly different glyph from lucide's.

* fix(settings): correct row bleed, delete-confirm binding, and avatar seeding

Follow-up from review of the consolidation.

The sandbox delete confirmation was boolean-only state. Browser Back unmounts
the modal without closing it, so opening another sandbox re-opened it already
confirmed — against the wrong sandbox. Reset it where the draft guard already
handles the same history hazard.

RESOURCE_LIST_GRID kept an 8px column gap after the bleed moved onto the row,
so neighbouring cards overlapped by exactly the gutter and the right-hand card's
stretched hit area won it: clicking between two cards opened the wrong one.
Budget the gap for the bleed instead.

Also: restore the `group` the template-icon hover outlines depend on; add a
`flush` row for headings and overflow boxes; seed MemberAvatar identically on
every surface; keep the MCP transport label visible in all row states; give the
Delete chip a stable id so it doesn't remount mid-delete; and stop an empty
subtitle rendering a phantom line.

Docs: widen the rule's path globs to the surfaces it now governs, drop the
`text-[14px]` example that contradicted the token rule, and add a Mode C for
migrating rows onto the primitive.

* revert(settings): keep the dense member roster avatar

Consolidating the Teammates/Organization avatar onto the credential member
row's was a redesign, not a deduplication. The two encode different things:
the roster is a dense list keyed on email where the avatar is a 14px neutral
marker, while a member management row carries a name, an email, and a role
control and earns a 36px hashed avatar.

Merging them made those rows ~70% taller, gave every workspace in a permission
group a colour-hashed "avatar" seeded on its name, and cut the Add Members
picker from ~7 visible rows to ~5 inside its fixed-height box.

Restores both avatars and the containers that owned their bleed, and records
in the rule why they stay separate. Keeps only the unrelated fix in that area:
the picker row was the one settings row rounded at `sm`.

* fix(settings): wire flush, drop the lone skeleton, close review gaps

Final review round. Two fixes the previous commit claimed but did not land:
`CredentialDetailHeading` never passed `flush`, so every credential detail
heading wore list-row padding, and the empty-subtitle guard was never applied.
Both were scripted replacements that silently no-op'd.

RESOURCE_LIST_GRID also dropped to one column 32px earlier than the grid it
replaced — `auto-fit` measures tracks, not margin boxes, so widening the gap
for the rows' bleed moved the breakpoint. Track minimum now budgets for it.

Removes the BYOK skeleton rather than maintaining a second copy of the row: it
was the only skeleton in settings, and it had already desynced from the row it
imitates. Its peers render nothing while loading.

Also: unify the glyph-tile treatment across MCP/sandboxes/workflow-MCP with
custom tools; move decoration out of `trailing` in verified-domains and
recently-deleted; convert the last hand-rolled row and empty states in
workflow-MCP, api-keys, copilot and group-detail; give copilot's delete the
same `...` affordance as api-keys; announce the row description via
aria-describedby, which the stretched overlay had silenced; and let
SettingsField render its own value so callers stop restating type tokens.

Docs: correct claims that predate this PR — `aside` does not exist, the
navigation source of truth is under components/, beforeunload mounts in the
layouts, `getSettingsSectionMeta` takes two args — and stop asserting a
literal-pixel grep returns zero when display type legitimately uses it.
…d rotate (#6201)

* fix(credentials): capture the correct provider identity on connect and rotate

Attio OAuth recorded an arbitrary workspace member instead of the authorizing
user, so two members connecting under one Sim user collapsed into a single
account row via the stale-sibling dedupe. Notion read `profile.person.email`,
which never exists on a bot token. Synthetic connector emails were minted on
live third-party domains. Google service-account rotation left the credential
labeled with the old key's client_email and skipped audit metadata entirely.
Box and Salesforce identity lookups failed silently with no logger in either
file.

Service-account principals are now a single ServiceAccountPrincipal union
(user / tenant / lookup_failed / null) mirrored centrally into both audit and
stored metadata, so a principal can no longer be captured and forgotten, and
"which account is this credential?" is answerable from SQL.

* fix(credentials): keep the provider-reported name when identity lookup degrades

Box and Salesforce returned early on a missing user id, discarding a `name` or
`login` the response did carry and relabeling the credential to the enterprise
or host fallback. Only the principal should degrade; the human label still
beats an id-derived string.

Also notes the Salesforce `openid` scope in the connect help text. The client
credentials minter sends no scope parameter — effective scopes come from the
customer's Connected App — so without `openid` the userinfo lookup can 403 and
the run-as user silently never reaches the audit record.
auth.ts had grown to 3,927 lines, of which ~2,340 were the genericOAuth
connector list — the OAuth apps a workspace connects tools to, as distinct from
the handful of providers used to sign in to Sim. Adding a connector meant
editing the same file that configures sessions, database hooks and Stripe.

Moves that list to lib/auth/connectors/providers.ts behind
buildConnectorProviders(), and relocates getMicrosoftUserInfoFromIdToken to
lib/oauth/microsoft.ts alongside the three Microsoft helpers it already depends
on. auth.ts drops to 1,489 lines and reads as auth configuration again.

Pure move, verified mechanically: the connector array is token-identical after
stripping whitespace, and all 179 template literals emit byte-identical strings
(the one apparent diff was reindentation inside a ${} expression, not text).
Behavior, evaluation order and log scopes are unchanged; the array is still
built once, when betterAuth() runs.

The explicit GenericOAuthConfig[] return type is required, not cosmetic —
inline, the entries were contextually typed by the config property. Without it
prompt: 'consent' widens to string and every getUserInfo parameter becomes
implicitly any.
…ptimization Actually Mean (#6204)

* feat(library): AEO vs GEO: What Answer Engine and Generative Engine Optimization Actually Mean

* feat(library): add generated cover for AEO vs GEO post

---------

Co-authored-by: Sim Pi Agent <pi@sim.ai>
Co-authored-by: Waleed Latif <walif6@gmail.com>
…6206)

Detail headers disagreed on where Delete sits. The skills page reads
`Share → Delete → Discard → Save`, but every SettingsPanel page spread
saveDiscardActions() first and appended Delete, rendering it to the RIGHT of
the primary chip: sandboxes, custom tools, custom blocks, permission groups and
data retention all did this.

Fixed in the shell rather than at nine callsites. orderHeaderActions() ranks
actions — secondary, then `id:'discard'`, then `variant:'primary'` — stably
within each band, so writing the array the natural way now produces the right
header and a new detail page cannot get it wrong. This generalizes past Save:
workflow MCP servers' `Add workflows` primary is now right-most with Delete
before it, instead of the reverse.

The ranking has to survive one trap. The shell routes onSelect through
configRef.current.actions[index] to avoid stale closures, so reordering the
render without preserving the source index would bind every chip to the wrong
handler — clicking Delete would Save. orderHeaderActions carries {action,index}
pairs; settings-header-shell.test.tsx pins that at the render level, including
the conditional-Discard case where a missing action shifts every index.

Delete is also now a plain chip on the nine resource-detail headers, matching
skills, each with a stable `id:'delete'` (three lacked one, so the chip
remounted when its label flipped to Deleting...). `variant:'destructive'` is
kept for actions destructive at scale — Delete all passwords, Clear all
browsing data, Sign out all members — which the confirm modal does not cover
the way it covers removing the single resource you are looking at.
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review. (288 files found, 100 file limit)

Bypass the limit by tagging @greptile-apps to review.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 3, 2026 5:37pm

Request Review

@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Changes touch secret exposure, Copilot tool confirmation trust, and workflow execution binding—security-critical paths with broad API and executor surface area. Markdown and settings-doc changes are lower risk but the Copilot/credentials cluster warrants careful review and regression testing.

Overview
This release tightens Copilot and headless execution around secrets and how async tool confirmations are trusted, while consolidating settings/credential UI onto shared primitives and fixing markdown blank-line handling in the file editor.

Secrets and Copilot execution adds configurable secret mount policy (all vs selected secrets) on schedules, inbox, and mothership/headless paths, with policy kept server-side in lifecycle options rather than echoed in client payloads. Personal env values are masked for viewers unless the caller owns the key or has credential-admin access; owned personal credentials list as admin without a membership row. Docs describe Copilot code execution: secrets only via explicit {{KEY}}, view permissions, and masking in Copilot-visible tool results. Function execute reports resolved secret names only after validation passes and handles selected scope and edge keys like __proto__.

Copilot confirm and workflow tools rewrites confirmation handling: generic client tool results are sealed in durable/pubsub payloads; workflow tool outcomes are structural only (workflow/execution IDs, canonical messages) and derived from trusted server execution state, with strict binding to claimed executions, idempotent retries, and rejection of forged or premature confirmations. Workflow SSE execute can bind copilotToolCallId, claim/release workflow tool execution, correlate logging, and await post-execution work before terminal events.

Settings and resource UI expands internal rules/skills for SettingsResourceRow, SettingsSection/SettingsField, header action ordering, and delete-chip conventions; credential detail headings and sections alias those primitives; RESOURCE_TILE_PLAIN supports brand tiles.

Markdown editor collapses all top-level empty paragraphs on parse (not only trailing), so huge blank runs no longer create thousands of empty nodes or reflow; chunked parsing no longer routes blank-run bodies to the slow whole-doc path. New jsdom tests cover two-writer agent streaming, multi-peer convergence, undo isolation, persist round-trip, and late joiners.

Reviewed by Cursor Bugbot for commit b741176. Configure here.

…6210)

Extends the settings-header ordering past detail pages.

Five headers hand-rolled their own action wrapper. `resource-header` used
`flex shrink-0 items-center` — no height, no gap, so chips on tables, files,
knowledge, logs and scheduled tasks sat flush against each other; the
integrations tab strip and the integration block detail each used `ml-auto flex
items-center`. Only the settings shell and credential detail wore the intended
`flex h-[30px] items-center gap-1`. That string is now HEADER_ACTION_CLUSTER,
next to PAGE_HEADER_BAR, and all five compose it.

`Resource.Header` now ranks its actions through orderHeaderActions too, so the
resource pages inherit the same order as settings rather than rendering their
array verbatim. `ResourceAction` gains `id`, which was the only field keeping it
from being a subset of `SettingsAction`.

Delete is now ranked by its `id` rather than by where the caller put it. That
matters for a header with no primary action: the file detail listed
`Download → Share → Delete`, leaving a destructive chip in the slot a primary
would occupy. Tagging it `id:'delete'` fixes that without inventing a primary.
@waleedlatif1
waleedlatif1 merged commit 7d889c3 into main Aug 3, 2026
41 of 43 checks passed
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.

2 participants