Skip to content

Commit 7d889c3

Browse files
authored
v0.7.53: sandboxes, settings consolidation, code hygiene
2 parents 13a9119 + feaddc4 commit 7d889c3

292 files changed

Lines changed: 34339 additions & 4964 deletions

File tree

Some content is hidden

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

.claude/rules/sim-settings-pages.md

Lines changed: 177 additions & 33 deletions
Large diffs are not rendered by default.

.claude/rules/sim-styling.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ paths:
88

99
## Tailwind
1010

11-
1. **No inline styles** - Use Tailwind classes
11+
1. **No inline styles** - Use Tailwind classes. Exception: a genuinely dynamic
12+
value (a hashed avatar colour, a brand tile background) that cannot be a class.
1213
2. **No duplicate dark classes** - Skip `dark:` when value matches light mode
13-
3. **Exact values** - `text-[14px]`, `h-[26px]`
14+
3. **Exact values over approximations** - `h-[26px]`, not `h-6`. But **type size is
15+
always a named token** (`text-sm`, `text-caption`) — never `text-[14px]`, which
16+
sets font-size only and inherits a different line-height. See
17+
`sim-settings-pages.md` for the scale.
1418
4. **Transitions** - `transition-colors` for interactive states
1519

1620
## Conditional Classes

.claude/skills/add-settings-page/SKILL.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ skill is the procedure.
1212

1313
Key paths:
1414
- Layout primitive: `apps/sim/app/workspace/[workspaceId]/settings/components/settings-panel/settings-panel.tsx`
15-
- Nav metadata (titles + descriptions): `apps/sim/app/workspace/[workspaceId]/settings/navigation.ts`
15+
- Nav metadata (titles + descriptions): `apps/sim/components/settings/navigation.ts`
1616
- Section switch + provider: `apps/sim/app/workspace/[workspaceId]/settings/[section]/settings.tsx`
1717
- Pages: `apps/sim/app/workspace/[workspaceId]/settings/components/<name>/<name>.tsx` and EE pages under `apps/sim/ee/<feature>/components/`
1818

@@ -53,7 +53,9 @@ For each page component, confirm the checklist in `.claude/rules/sim-settings-pa
5353
3. Find literal pixel text sizes (should be 0 — see "Text-scale tokens" in
5454
`.claude/rules/sim-settings-pages.md` for the token map and the row
5555
title/subtitle pairing convention):
56-
`git grep -n "text-\[1[0-8]px\]" -- 'apps/sim/**/settings/' 'apps/sim/ee/'`
56+
`git grep -nE "text-\[1[0-8]px\]" -- 'apps/sim/**/settings/' 'apps/sim/ee/'` — should
57+
be 0. Display type above the scale (`text-[40px]` hero headings, the `text-[8px]`
58+
member-avatar initial) is deliberate and out of scope.
5759
4. Confirm each page imports `SettingsPanel` and that its `NavigationItem` has an
5860
accurate `description` of consistent length with its peers.
5961
- Editable pages: confirm Save/Discard go through `SaveDiscardActions` and
@@ -77,3 +79,31 @@ For each page component, confirm the checklist in `.claude/rules/sim-settings-pa
7779
8. **Verify the whole sweep:** `tsc --noEmit`, `biome check` on every touched
7880
file, and run the affected pages' tests. Diff each file against the base and
7981
confirm the change is purely structural before shipping.
82+
83+
## Mode C — Migrate list rows to `SettingsResourceRow`
84+
85+
Read "The resource row" in `.claude/rules/sim-settings-pages.md` first — it is the
86+
contract. Then, per page:
87+
88+
1. Find hand-rolled rows:
89+
`git grep -n "truncate text-\[var(--text-body)\] text-sm" -- 'apps/sim/app/workspace/' 'apps/sim/ee/'`
90+
Every match outside `settings-resource-row.tsx` is either a row to migrate or a
91+
genuinely different shape (multi-line body, tabular columns, a grid) that stays
92+
bespoke — decide which, and say so.
93+
2. Replace the row *and* its wrapper: a `<button>`/`<Link>` around the row becomes
94+
`onClick`/`href` on the row itself. Wrapping the row is what the primitive
95+
exists to stop — it is also invalid HTML once `trailing` holds a control.
96+
3. Sort the trailing content: interactive → `trailing`, decorative → `badge`.
97+
Getting this backwards makes the row's right edge a dead zone.
98+
4. Add `navigable` only if the row opens a detail page, and `clickLabel` always.
99+
5. Drop the container's `-mx-2` — the row now owns the bleed. Use
100+
`RESOURCE_LIST_STACK` / `RESOURCE_LIST_GRID`; do not hand-write the gap.
101+
6. Unlike Mode B, this migration **may** change conditional rendering: a
102+
`<button disabled={!can}>` becomes `onClick={can ? … : undefined}` +
103+
`navigable={can}`, which renders a plain non-interactive row. Verify the gated
104+
state has no clickable affordance left.
105+
7. Check what the old row rendered *beside* the title (a badge, a timestamp, a
106+
transport label). The row's title truncates as one unit, so anything folded
107+
into it can be ellipsised away — move it to `description` or `badge`.
108+
8. Verify: `tsc --noEmit`, `biome check`, the page's tests, and a diff read of
109+
every converted block for lost props, conditions, and `key` placement.

apps/docs/content/docs/en/platform/credentials.mdx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ This is an observability projection only. Secret resolution and workflow behavio
7575
Masking is activated only when Sim successfully resolves a value from **Settings → Secrets** through `{{KEY}}`. A hardcoded literal, direct `environmentVariables['KEY']` read, or shell `$KEY` read does not activate it by itself. Once activated, every exact occurrence of that value in the run's log-facing content is masked. Encoded, hashed, or otherwise transformed versions are not matched. Do not deliberately return or print secrets.
7676
</Callout>
7777

78+
### Copilot code execution
79+
80+
Copilot's Function and code-execution tools receive a saved secret only when their code explicitly contains a valid `{{KEY}}` reference. Direct `environmentVariables.KEY` access, shell `$KEY`, dynamic names, literals, and configured-but-unused secrets do not mount a value. Code execution requires workspace write access, and the caller must also be allowed to view the raw value: your own Personal secrets, any secret for which you are a Credential Admin, and Workspace secrets when you are a workspace admin. Credential Members can continue using shared secrets through normal workflow and tool resolution, but cannot mount their plaintext into arbitrary Copilot code.
81+
82+
Headless surfaces use their saved **Secret access** setting:
83+
84+
- **Sim Chat block** — under **Show additional fields**
85+
- **Scheduled Tasks** — in the task modal
86+
- **Inbox** — under **Settings → Inbox → Secrets**
87+
88+
Choose **All secrets** or **Selected secrets**. Existing configurations default to **All secrets** for compatibility. **All secrets** still means only secrets explicitly referenced with `{{KEY}}` that the execution actor may view; it never injects the full environment. Inbox messages from allowed external senders do not receive raw-secret access.
89+
90+
Code receives the real authorized value at runtime. Before any Copilot-visible tool result is returned, exact occurrences of activated secret values are replaced with `{{KEY}}`; local side effects and runtime results are not rewritten. Encoded, hashed, URL-encoded, otherwise transformed, or network-exfiltrated values cannot be inferred and masked reliably, so code should not deliberately return, transform, print, or transmit secrets to unintended destinations.
91+
7892
## Secret Details
7993

8094
Click **Details** on any secret row to open its detail view.
@@ -122,8 +136,8 @@ When a workflow runs, secrets resolve in this order:
122136

123137
<FAQ items={[
124138
{ question: "Are my secrets encrypted at rest?", answer: "Yes. Values saved under Secrets are encrypted before being stored in the database." },
125-
{ question: "Can a saved secret still appear in a workflow result?", answer: "Yes. Functional data is not rewritten, so the raw value can still reach downstream blocks, tools, and models and can appear in workflow execution responses, streams, or callbacks if your workflow deliberately returns or prints it. Log-facing views and read APIs, including Workflow Output on the Logs Overview and the Logs block's Get Run Details output, receive a protected copy after a successful {{KEY}} substitution." },
126-
{ question: "What happens if both a workspace secret and a personal secret have the same key name?", answer: "The workspace secret takes precedence. During execution, the resolver checks workspace secrets first and uses personal secrets only as a fallback. This ensures production workflows use the shared, team-managed value." },
139+
{ question: "Can a saved secret still appear in a workflow result?", answer: "Yes. Functional workflow data is not rewritten, so the raw value can still reach downstream blocks, tools, and models and can appear in workflow execution responses, streams, or callbacks if your workflow deliberately returns or prints it. Log-facing views and read APIs receive a protected copy after a successful {{KEY}} substitution. Copilot-visible tool results also mask exact activated values, but transformed values remain outside that protection." },
140+
{ question: "What happens if both a workspace secret and a personal secret have the same key name?", answer: "Among secrets available to the execution actor, the workspace secret takes precedence and the personal secret is the fallback. An inaccessible workspace secret does not shadow an authorized personal value." },
127141
{ question: "Who determines which personal secret is used for automated runs?", answer: "For manual runs, the personal secrets of the user who clicked Run are used as fallback. For automated runs triggered by API, webhook, or schedule, the personal secrets of the workflow owner are used instead." },
128142
{ question: "Can I import secrets from a .env file?", answer: "Yes. Paste .env-style content (KEY=VALUE format) into any key or value field and the secrets will be auto-populated. The parser supports export KEY=VALUE, quoted values, and inline comments." },
129143
{ question: "What happens if I delete a secret that is used in a workflow?", answer: "The workflow will fail at any block that references the deleted secret during execution because the value cannot be resolved. Update any references before deleting a secret." },

0 commit comments

Comments
 (0)