Skip to content

v0.7.31: sidebar shortcut, env var expansion in lifecycle triggers, ashby fixes#5622

Merged
waleedlatif1 merged 5 commits into
mainfrom
staging
Jul 12, 2026
Merged

v0.7.31: sidebar shortcut, env var expansion in lifecycle triggers, ashby fixes#5622
waleedlatif1 merged 5 commits into
mainfrom
staging

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

* feat(sidebar): add Cmd+B shortcut to toggle sidebar collapse

* fix(sidebar): skip Cmd+B sidebar toggle inside editable fields

* fix(sidebar): don't dead-zone Cmd+B on read-only editors; drop stale Mod+B ownership

* chore(lint): apply biome fixes
…scription creation (#5619)

* fix(webhooks): resolve env var references before deploy-triggered subscription creation

Provider config fields like an API key can reference an environment
variable via {{VAR_NAME}}. The interactive trigger-save route already
resolved these before calling a provider's createSubscription, but the
async deployment-outbox path (workflow deploy -> saveTriggerWebhooksForDeploy
-> createExternalWebhookSubscription) did not, so the literal unresolved
{{VAR_NAME}} string was sent to the provider as the credential and
rejected. Resolve env vars in createExternalWebhookSubscription itself so
both callers behave the same; the persisted providerConfig keeps storing
the unresolved template, only the outbound call gets the resolved value.

* fix(webhooks): guard against a non-string workspaceId when resolving env vars

workflow.workspaceId as string | undefined was an unchecked cast on a
Record<string, unknown> — if a caller ever passed a workflow-like object
where workspaceId isn't actually a string, workspace-scoped {{VAR}}
references would silently stay unresolved and the provider would receive
the literal template as the credential, reproducing the exact class of bug
this change exists to fix. Replaced with a runtime typeof check that falls
back to undefined (personal-env-only resolution) instead of forwarding an
unvalidated value.
… before dispatch (#5621)

* fix(ashby): parse alternateEmailAddresses and socialLinks into arrays before dispatch

The Ashby create_candidate and update_candidate tools require
alternateEmailAddresses (string[]) and socialLinks ({type,url}[]) as
JSON arrays in the request body, guarded by Array.isArray checks. The
block collected both through long-input text fields but forwarded the
raw string straight through to tools.config.params, so Array.isArray
was always false and both fields were silently dropped on every
create/update call.

Parse them in tools.config.params (execution-time, after variable
resolution) using the same comma-separated-or-JSON-array pattern used
elsewhere in the codebase (see blocks/findymail.ts), and add wandConfig
to both fields so the AI wand can generate well-formed input for them.

* fix(ashby): drop json-object generationType from array-shaped wandConfig fields

generationType: 'json-object' makes the wand API append an instruction
that the response must start with { and end with }, but
alternateEmailAddresses/socialLinks parse a raw JSON array or
comma-separated string, not an object. A wand-generated
{"emails":[...]}-shaped response would get comma-split into invalid
email fragments by parseStringListInput, and an object-wrapped
socialLinks response would get silently dropped by parseSocialLinksInput
returning []. Matches the existing array-field wandConfig pattern in
blocks/findymail.ts, which never sets generationType and relies on the
prompt text alone.

* fix(ashby): remove the non-functional candidateId filter from list_applications

Live-verified against Ashby's application.list endpoint: passing
candidateId (including a nonexistent UUID) returns identical, unfiltered
results either way — Ashby's API silently ignores this body field
entirely. Sending it gave users the false impression of filtering by
candidate while actually returning every application. Removed the param,
the tool type, and the block's filterCandidateId subBlock/wiring/input.
The correct path for a candidate's applications is ashby_get_candidate's
applicationIds field.

* fix(ashby): add subblock-id migration for the removed filterCandidateId field

The subblock ID stability CI check correctly caught that removing
filterCandidateId without a migration entry would silently drop the
value on already-deployed workflows. Added the standard _removed_ mapping,
following the same pattern already used for this block's prior removals
(emailType, phoneType, expandApplicationFormDefinition,
expandSurveyFormDefinitions).
@vercel

vercel Bot commented Jul 12, 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 Jul 12, 2026 5:10am

Request Review

@cursor

cursor Bot commented Jul 12, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Webhook subscription creation now depends on env resolution at deploy time (credentials/workspace scope); Ashby removes a filter UI and changes request payloads for list/create/update candidate flows.

Overview
Adds Mod+B (toggle-sidebar) as a global command that collapses/expands the workspace sidebar (blocked in text fields), with the collapse control tooltip showing the shortcut.

Global commands now use isEditableElement so contenteditable="false" (e.g. read-only editors) no longer blocks shortcuts that set allowInEditable: false; tests cover inputs, real contenteditable, and read-only regions.

Webhook deploy/lifecycle registration resolves {{ENV_VAR}} in providerConfig via resolveWebhookProviderConfig before calling the provider’s createSubscription, while still persisting the unresolved config plus provider-managed updates—covered by new provider-subscriptions tests.

Ashby block parses alternateEmailAddresses and socialLinks into proper arrays before API calls, adds wand prompts without json-object generation, removes the non-functional list applications candidate filter (filterCandidateId / candidateId), and migrates away the old subblock field.

tool-schemas-v1.ts is a mechanical key style change (['agent']agent).

Reviewed by Cursor Bugbot for commit 5dec4f3. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates shortcuts, webhook subscription setup, and Ashby block inputs. The main changes are:

  • Adds a Mod+B global command for toggling the workspace sidebar.
  • Resolves webhook provider env-var references before provider subscription creation.
  • Parses Ashby array-shaped inputs before dispatch.
  • Removes the unsupported Ashby candidate application filter wiring.

Confidence Score: 5/5

This looks safe to merge after small input-handling cleanups.

  • No blocking issues found in the changed code.
  • The remaining findings are contained UI/input edge cases.
  • Webhook env resolution keeps persisted provider config unresolved.

apps/sim/app/workspace/[workspaceId]/providers/global-commands-provider.tsx; apps/sim/blocks/blocks/ashby.ts

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/providers/global-commands-provider.tsx Refines editable detection for global commands; ancestor contenteditable handling can still miss nested editor focus.
apps/sim/app/workspace/[workspaceId]/utils/commands-utils.ts Adds the toggle-sidebar command definition with Mod+B and editable suppression.
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx Registers the sidebar toggle command and displays the shortcut in the collapse tooltip.
apps/sim/lib/webhooks/provider-subscriptions.ts Resolves provider config env references before calling subscription handlers while preserving unresolved config for storage.
apps/sim/blocks/blocks/ashby.ts Adds Ashby input parsers and removes the unsupported candidate application filter; malformed social link text is silently dropped.
apps/sim/tools/ashby/list_applications.ts Removes the candidateId request field from the Ashby list applications tool.

Reviews (1): Last reviewed commit: "fix(ashby): parse alternateEmailAddresse..." | Re-trigger Greptile

Comment thread apps/sim/blocks/blocks/ashby.ts Outdated
Comment on lines +27 to +28
return Array.isArray(parsed) ? parsed : []
} catch {

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.

P2 Malformed Social Links Disappear

When the wand or a user enters social links as a non-JSON string, this parser returns an empty array and the params builder omits socialLinks entirely. The Ashby update can then complete without applying the requested social links, with no error shown to the workflow author.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Confirmed real — good catch. Traced it: parseSocialLinksInput returns [] on any non-JSON-parseable input, and tools.config.params only sets result.socialLinks when the parsed array is non-empty, so malformed input silently omits the field and the Ashby update 'succeeds' without applying the requested links. Fixed in #5624 (throws a clear error instead, matching the existing throw-on-invalid-JSON pattern in blocks/airtable.ts) rather than fixing it here directly since this is the staging→main release PR, not the feature branch.

…5623)

* fix(global-commands): use isContentEditable for the editable guard

* chore(lint): keep focusable span in editable-guard test with biome-ignore
…Links (#5624)

* fix(ashby): fail loudly instead of silently dropping malformed socialLinks

parseSocialLinksInput returned [] for any non-JSON-parseable input, and
tools.config.params only sets result.socialLinks when the parsed array is
non-empty — so a malformed socialLinks string (user typo, or a wand
response that didn't follow the JSON-array prompt) silently omitted the
field entirely. The Ashby candidate.update call then succeeded without
applying the requested links, with no error surfaced to the workflow
author. Throw a clear error instead, matching the existing
throw-on-invalid-JSON pattern used elsewhere (e.g. blocks/airtable.ts).

* fix(ashby): use getErrorMessage instead of inline error-message extraction

check:utils bans the e instanceof Error ? e.message : fallback pattern in
favor of getErrorMessage(e, fallback?) from @sim/utils/errors.
@waleedlatif1 waleedlatif1 merged commit e01bfb1 into main Jul 12, 2026
15 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