Skip to content

v0.7.65: email template alignment, logs enrichment, execution files unique keys - #6481

Merged
waleedlatif1 merged 4 commits into
mainfrom
staging
Aug 10, 2026
Merged

v0.7.65: email template alignment, logs enrichment, execution files unique keys#6481
waleedlatif1 merged 4 commits into
mainfrom
staging

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Execution file keys were built as
execution/{workspaceId}/{workflowId}/{executionId}/{fileName}, so two files
sharing a display name within one execution resolved to the same key and URL.
The second upload overwrote the first in object storage and updated its
workspace_files row instead of inserting, silently losing a file. Any trigger
that ingests multiple attachments hits this — repeated screenshot names, mail
clients that reuse inline-image names, or a loop emitting the same output name.

generateUniqueExecutionFileKey now allocates a unique directory segment
(.../{executionId}/{uuid}/{fileName}) and uploadExecutionFile uses it, so every
execution file gets its own key. The uniquifier is its own path segment rather
than a filename prefix because presigned URLs carry no content-disposition: the
key's final segment is the name a consumer sees, and a prefix would rename
every download.

The deterministic generator is renamed to generateLargeValuePayloadKey and
takes the payload id instead of a free-form file name, so no user-supplied name
can reach a key without a uniquifier. Its output is unchanged — determinism is
load-bearing there, since the cleanup job matches those keys by LIKE pattern
and the trace store recovers workflowId by segment position.

Every reader tolerates the extra segment: key parsers use parts.length >= 5
with fixed indices, storage providers write a preserved key verbatim, and
local-disk storage already creates the dirname recursively.
…design system (#6479)

* improvement(emails): align the email design tokens with the platform design system

* improvement(emails): preview every template in a single gallery page

* improvement(emails): align font stack, logo and social-icon sizing with the platform

* improvement(emails): tokenize the CTA and footnote, and enforce the platform mirror with a test

* fix(emails): restore row spacing in the payment-failed details box

* fix(emails): restore row spacing in the batch-invitation workspace list
…ete (#6478)

Incompleteness is one-way: once any guard trips, every later model projection in
the run fails and the user is left with a single opaque sentence. Every guard
could set it and none recorded which, in a file that imported no logger at all,
so the cause could not be recovered after the fact.

Name each guard with a static reason literal. Originating causes log at error
because they permanently fail the run and error is the only level that survives
every default the logger falls back to; reasons that merely carry an upstream
fault forward log at warn so one fault does not read as several. The decrypt
catch no longer discards its cause.

No behaviour change. Reasons are static literals and the logged input path is
block/field names; no resolved value is recorded.
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 10, 2026 1:30am

Request Review

@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Execution key shape changes affect every execution upload path (presigned, multipart, file manager) and could interact with cleanup or serve URLs; email changes are mostly visual/preview. Secret-registry logging touches hot execution paths but is additive.

Overview
This release bundles email design-system alignment, unique execution file storage keys, and resolved-secret registry diagnostics, plus a richer email preview gallery.

Emails — Hardcoded tokens in base.ts now mirror platform globals.css and Tailwind (base.tokens.test.ts guards drift). Templates share EmailButton, EmailStrong, ProFeaturesBox, and tokens like greeting, footnote, and errorBox instead of one-off markup. Plain/unbranded emails use getBrandConfig() for the product name. The preview API lists more templates in a categorized iframe grid with auto-uncategorized registration.

Execution uploads — Same display name in one run no longer overwrites storage: generateUniqueExecutionFileKey puts a unique id in the path (…/uuid/filename). Large-value JSON payloads still use deterministic generateLargeValuePayloadKey for cleanup/idempotency. Presigned and multipart routes and uploadExecutionFile follow the new helper.

ProvenanceResolvedSecretTraceRegistry records why incompleteness happened (typed reasons, error vs warn, no secret material in logs). Staged value-filter registries avoid duplicate summaries; decrypt failures log once per import batch.

Reviewed by Cursor Bugbot for commit a554430. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR aligns email templates with shared design tokens, expands the email-preview gallery, assigns unique keys to execution files while preserving deterministic large-value keys, and enriches resolved-secret provenance diagnostics.

  • Introduces reusable email layout, button, emphasis, footer, and billing-feature components across the template suite.
  • Moves ordinary execution files to collision-resistant nested keys while retaining deterministic storage for large execution payloads.
  • Adds reason-specific, secret-safe diagnostics for incomplete resolved-secret registries.
  • Extends route and utility tests for duplicate filenames, storage-key behavior, email tokens, and diagnostic redaction.

Confidence Score: 5/5

The PR appears safe to merge; no concrete blocking or independently actionable non-blocking defects were identified.

The new execution-key shape remains compatible with authorization, serving, local and cloud storage, and cleanup paths, while the email and provenance changes use closed inputs and avoid exposing secret values.

Important Files Changed

Filename Overview
apps/sim/lib/uploads/contexts/execution/utils.ts Separates deterministic large-value payload keys from unique user-visible execution-file keys; existing key consumers remain compatible with the added path segment.
apps/sim/lib/uploads/contexts/execution/execution-file-manager.ts Allocates a new collision-resistant key for every execution-file upload, preventing same-name overwrites.
apps/sim/lib/execution/payloads/store.ts Retains deterministic large-value persistence through the dedicated payload-key helper.
apps/sim/executor/utils/resolved-secret-trace-registry.ts Records bounded, reason-specific incompleteness diagnostics without logging resolved secret values.
apps/sim/app/api/emails/preview/route.ts Expands the preview catalog into an iframe gallery using closed template identifiers and shared email design tokens.
apps/sim/components/emails/_styles/base.ts Consolidates email design tokens and reusable style definitions consumed throughout the updated templates.

Reviews (1): Last reviewed commit: "fix(provenance): record why a resolved-s..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit cb28d14 into main Aug 10, 2026
56 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.

1 participant