Skip to content

v0.6.44: streamdown, mothership intelligence, excel extension#4173

Merged
waleedlatif1 merged 9 commits intomainfrom
staging
Apr 15, 2026
Merged

v0.6.44: streamdown, mothership intelligence, excel extension#4173
waleedlatif1 merged 9 commits intomainfrom
staging

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

@waleedlatif1 waleedlatif1 commented Apr 15, 2026

emir-karabeg and others added 7 commits April 14, 2026 15:31
…#4163)

* improvement(ui): delegate streaming animation to Streamdown component

Remove custom useStreamingText hook and useThrottledValue indirection
in favor of Streamdown's built-in streaming props. This eliminates the
manual character-by-character reveal logic (setInterval, easing, chase
factor) and lets the library handle animation natively, reducing
complexity and improving consistency across Mothership and chat.

* improvement(ui): inline passthrough wrapper, add hydration guard

- Inline EnhancedMarkdownRenderer which became a trivial passthrough
  after removing useThrottledValue
- Add hydration guard to MarkdownRenderer to prevent replaying the
  entrance animation when mounting mid-stream with existing content

* improvement: removed chat animation

* improvement(ui): remove hardcoded fade-in animations from special tags

Remove animate-stream-fade-in from OptionsDisplay, CredentialDisplay,
MothershipErrorDisplay, and UsageUpgradeDisplay. These components
re-render after streaming ends, causing a visible flash as the
opacity animation replays. PendingTagIndicator retains its animation
since it only renders during active streaming.

* fix(ui): use streaming mode for Streamdown during active streams

mode='static' disables Remend (auto-closing incomplete markdown),
incremental block splitting, and React Transitions. Switch to
streaming mode while isStreaming is true so partial markdown renders
correctly, without re-adding animation props.
* fix(ui): fix resource switching logic, multi select delete

* Allow cmd+click on workspace menu

* Add search bar to workspace modal

* address greptile comments

* fix resource tab scroll
…e headers (#4168)

* fix(seo): correct canonical URLs, compress oversized images, add cache headers

- Replace all hardcoded https://sim.ai with https://www.sim.ai via SITE_URL constant
- Migrate models, integrations, and homepage metadata from getBaseUrl() to SITE_URL
- Compress 6 blog/landing images from 2.6MB to 300KB total
- Convert mothership cover from PNG to JPEG (1.1MB → 99KB)
- Add Cache-Control headers for static assets (1d max-age, 7d stale-while-revalidate)
- Add SEO regression test scanning all public pages for canonical URL violations

* fix(seo): replace hardcoded URLs with SITE_URL, broaden test detection

- Replace hardcoded https://www.sim.ai with SITE_URL in academy, changelog.xml, and whitelabeling
- Broaden getBaseUrl() detection in SEO test to match any variable name assignment
- Add ee/whitelabeling/metadata.ts to SEO test scan scope
The PlayOutline icon had a non-standard viewBox and mismatched path,
causing it to render at an inconsistent size and shape compared to the
filled Play icon and other action bar icons.
…e blocks (#4172)

* fix(blocks): correct required field validation for Jira and Confluence blocks

Jira: summary is only required for create (not update), projectId is not required for update (API uses issueKey). Confluence: title and content are required for page creation, title is required for blog post creation — all enforced by backend validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(blocks): remove projectId dependsOn gate for update fields, require content for blog post creation

Jira: Remove dependsOn projectId from shared write/update fields — projectId is not required for update so the gate would disable all update fields when no project is selected. Write-only fields (issueType, parentIssue, reporter) retain the gate since projectId is required for create.

Confluence V2: Add create_blogpost to content required condition — backend Zod schema enforces content for blog post creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* lint

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…tion (#4162)

* feat(microsoft-excel): add SharePoint drive support for Excel integration

* fix(microsoft-excel): address PR review comments

- Validate siteId/driveId format in drives route to prevent path traversal
- Use direct single-drive endpoint for fetchById instead of filtering full list
- Fix dependsOn on sheet/spreadsheet selectors so driveId flows into context
- Fix NextRequest type in drives route for build compatibility

* fix(microsoft-excel): validate driveId in files route

Add regex validation for driveId query param in the Microsoft OAuth
files route to prevent path traversal, matching the drives route.

* fix(microsoft-excel): unblock OneDrive users and validate driveId in sheets route

- Add credential to any[] arrays so OneDrive users (no drive selected)
  still pass the dependsOn gate while driveSelector remains in the
  dependency list for context flow to SharePoint users
- Add /^[\w-]+$/ validation for driveId in sheets API route

* fix(microsoft-excel): validate driveId in getItemBasePath utility

Add regex validation for driveId at the shared utility level to prevent
path traversal through the tool execution path, which bypasses the
API route validators.

* fix(microsoft-excel): use centralized input validation

Replace inline regex validation with platform validators from
@/lib/core/security/input-validation:
- validateSharePointSiteId for siteId in drives route
- validateAlphanumericId for driveId in drives, sheets, files routes
  and getItemBasePath utility

* lint

* improvement(microsoft-excel): add File Source dropdown to control SharePoint visibility

Replace always-visible optional SharePoint fields with a File Source
dropdown (OneDrive/SharePoint) that conditionally shows site and drive
selectors. OneDrive users see zero extra fields (default). SharePoint
users switch the dropdown and get the full cascade.

* fix(microsoft-excel): fix canonical param test failures

Make fileSource dropdown mode:'both' so it appears in basic and advanced
modes. Add condition to manualDriveId to match driveSelector's condition,
satisfying the canonical pair consistency test.

* fix(microsoft-excel): address PR review feedback for SharePoint drive support

- Clear stale driveId/siteId/spreadsheetId when fileSource changes by adding
  fileSource to dependsOn arrays for siteSelector, driveSelector, and
  spreadsheetId selectors
- Reorder manualDriveId before manualSpreadsheetId in advanced mode for
  logical top-down flow
- Validate spreadsheetId with validateMicrosoftGraphId in getItemBasePath()
  and sheets route to close injection vector (uses permissive validator that
  accepts ! chars in OneDrive item IDs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(microsoft-excel): use validateMicrosoftGraphId for driveId validation

SharePoint drive IDs use the format b!<base64-string> which contains !
characters rejected by validateAlphanumericId. Switch all driveId
validation to validateMicrosoftGraphId which blocks path traversal and
control characters while accepting valid Microsoft Graph identifiers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(microsoft-excel): use validatePathSegment with strict pattern for driveId/spreadsheetId

Replace validateMicrosoftGraphId with validatePathSegment using a custom
pattern ^[a-zA-Z0-9!_-]+$ for all URL-interpolated IDs. validatePathSegment
blocks /, \, path traversal, and null bytes before checking the pattern,
preventing URL-modifying characters like ?, #, & from altering the Graph
API endpoint. The pattern allows ! for SharePoint b!<base64> drive IDs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* lint

* fix(microsoft-excel): reorder driveId before spreadsheetId in v1 block

Move driveId subBlock before manualSpreadsheetId in the legacy v1 block
to match the logical top-down flow (Drive ID → Spreadsheet ID), consistent
with the v2 block ordering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(microsoft-excel): clear manualDriveId when fileSource changes

Add dependsOn: ['fileSource'] to manualDriveId so its value is cleared
when switching from SharePoint back to OneDrive. Without this, the stale
driveId would still be serialized and forwarded to getItemBasePath,
routing through the SharePoint drive path instead of me/drive.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(microsoft-excel): use getItemBasePath in sheets route to remove duplication

Replace inline URL construction and validation logic with the shared
getItemBasePath utility, eliminating duplicated GRAPH_ID_PATTERN regex
and conditional URL building.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* lint

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 15, 2026 4:52am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 15, 2026

PR Summary

Medium Risk
Touches SEO canonical URL generation across many public pages and refactors chat resource removal to a single SQL update, which could impact indexing and persistence if incorrect. Adds new Microsoft Graph/SharePoint parameters and endpoints that must be validated to avoid auth/path issues.

Overview
Standardizes SEO URLs by introducing SITE_URL (https://www.sim.ai) and replacing hardcoded https://sim.ai / getBaseUrl() usage across landing/blog/changelog/structured-data, RSS/sitemaps, redirects, and blog canonical frontmatter; adds a Vitest guard to prevent regressions and sets cache headers for static assets.

Extends Microsoft Excel integration to support SharePoint drives: adds optional driveId to read/write tools and selectors, introduces SharePoint site/drive selection flow (new microsoft.excel.drives selector + /api/tools/microsoft_excel/drives), updates Graph API paths to use /drives/{driveId} when provided, and validates Graph IDs.

Improves Copilot/chat UX and correctness: removes custom streaming text animation in favor of Streamdown, ensures resource tab auto-scroll and safer active resource selection, makes chat resource deletion atomic (JSONB filter + returning) and simplifies optimistic cache rollback, and enriches MCP/subagent build calls with workspace/workflow context plus new internal debug/run subagents (including remapping sim_test to run).

Also adjusts required-field validation for Jira/Confluence block inputs and updates minor UI/icon/docs details (PlayOutline SVG, Jira description docs, Excel docs driveId).

Reviewed by Cursor Bugbot for commit 8009578. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 15, 2026

Greptile Summary

This release bundles seven PRs: SharePoint drive support for Microsoft Excel, streaming animation delegated to Streamdown, mothership intelligence regression fix (workspace context was missing from build-mode tool calls), Jira/Confluence required-field validation corrections, resource-tab UX fixes (active tab persistence, scroll-to-active), workspace modal search, and SEO canonical URL corrections with image compression.

Confidence Score: 5/5

Safe to merge — no blocking logic or security issues found.

All findings are P2 style/cleanup suggestions. The core changes (atomic DB delete, functional optimistic updates, workspace context fix, SharePoint URL dispatch via getItemBasePath) are well-implemented and security validations on SharePoint IDs are thorough throughout all new routes.

apps/sim/tools/microsoft_excel/utils.ts (displaced TSDoc) and apps/sim/blocks/blocks/microsoft_excel.ts (redundant dependsOn clause).

Important Files Changed

Filename Overview
apps/sim/tools/microsoft_excel/utils.ts Adds getItemBasePath helper for SharePoint/OneDrive URL dispatch; TSDoc comment is misplaced above GRAPH_ID_PATTERN constant rather than immediately before the function.
apps/sim/app/api/tools/microsoft_excel/drives/route.ts New POST endpoint for listing/fetching SharePoint document libraries; validates siteId and driveId, uses authorizeCredentialUse, and handles single-drive lookup via driveId body param.
apps/sim/blocks/blocks/microsoft_excel.ts Adds SharePoint site/drive selectors to V2 block; dependsOn for manualSpreadsheetId and manualSheetName includes a redundant any: ['credential', 'manualDriveId'] clause always satisfied when credential is in all.
apps/sim/lib/copilot/request/subagent.ts Mothership intelligence fix: now resolves workflowName, workspaceId, and workspaceContext before forwarding to the subagent endpoint.
apps/sim/app/api/copilot/chat/resources/route.ts DELETE handler replaced with atomic PostgreSQL JSONB update, eliminating the previous read-then-write race condition.
apps/sim/hooks/queries/tasks.ts Optimistic update for resource removal refactored to use functional setQueryData and targeted rollback via context.removed; correct pattern for concurrent mutations.
apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx Adds scroll-to-active tab effect using getBoundingClientRect; switches from serialized mutateAsync loop to concurrent mutate calls (safe now that the server DELETE is atomic).
apps/sim/blocks/blocks/jira.ts Corrects required-field validation: project no longer required for update, summary required only for write, unnecessary dependsOn: ['projectId'] chains removed from optional fields.
apps/sim/next.config.ts Adds Cache-Control headers for static assets and fixes redirect destinations to use www.sim.ai canonical host.
apps/sim/hooks/use-streaming-text.ts Deleted — streaming animation fully delegated to Streamdown component.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Block: MicrosoftExcelV2] -->|fileSource = onedrive| B[microsoft.excel selector\nme/drive/root/search]
    A -->|fileSource = sharepoint| C[sharepoint.sites selector]
    C --> D[microsoft.excel.drives selector\nPOST /api/tools/microsoft_excel/drives]
    D --> E[microsoft.excel selector\ndrives/driveId/root/search]
    B --> F[spreadsheetId resolved]
    E --> F
    F --> G[microsoft.excel.sheets selector\nGET /api/tools/microsoft_excel/sheets]
    G --> H[sheetName resolved]
    H --> I[Tool execution\ngetItemBasePath builds Graph URL]
    I -->|driveId absent| J[me/drive/items/spreadsheetId/...]
    I -->|driveId present| K[drives/driveId/items/spreadsheetId/...]
Loading

Reviews (1): Last reviewed commit: "feat(microsoft-excel): add SharePoint dr..." | Re-trigger Greptile

…lidation (#4174)

* refactor(microsoft-excel): export GRAPH_ID_PATTERN and reuse across routes

Export the shared regex pattern from utils.ts and import it in files/route.ts
and drives/route.ts instead of duplicating the inline pattern. Also reorders
the TSDoc comment to sit above getItemBasePath where it belongs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* lint

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* v0.6.29: login improvements, posthog telemetry (#4026)

* feat(posthog): Add tracking on mothership abort (#4023)

Co-authored-by: Theodore Li <theo@sim.ai>

* fix(login): fix captcha headers for manual login  (#4025)

* fix(signup): fix turnstile key loading

* fix(login): fix captcha header passing

* Catch user already exists, remove login form captcha

* improvement(ui): rename user-facing "execution" to "run"

* fix(mothership): remove duplicate handleStopGeneration declaration

* chore: remove verbose comment in cancel route

* fix(ui): missed execution → run renames in search suggestions and error fallback

---------

Co-authored-by: Theodore Li <theodoreqili@gmail.com>
@waleedlatif1 waleedlatif1 merged commit 46ffc49 into main Apr 15, 2026
30 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.

5 participants