Skip to content

v0.6.45: superagent, csp, brightdata integration, gemini response format, logs performance improvements#4187

Merged
Sg312 merged 7 commits intomainfrom
staging
Apr 15, 2026
Merged

v0.6.45: superagent, csp, brightdata integration, gemini response format, logs performance improvements#4187
Sg312 merged 7 commits intomainfrom
staging

Conversation

@Sg312
Copy link
Copy Markdown
Collaborator

@Sg312 Sg312 commented Apr 15, 2026

Summary

fix(csp): add missing analytics domains, remove unsafe-eval, fix workspace CSP gap (#4179)
fix(landing): return 404 for invalid dynamic route slugs (#4182)
improvement(seo): optimize sitemaps, robots.txt, and core web vitals across sim and docs (#4170)
fix(gemini): support structured output with tools on Gemini 3 models (#4184)
feat(brightdata): add Bright Data integration with 8 tools (#4183)
fix(mothership): fix superagent credentials (#4185)
fix(logs): close sidebar when selected log disappears from filtered list; cleanup (#4186)

waleedlatif1 and others added 7 commits April 15, 2026 10:04
* 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

* fix(landing): return 404 for invalid dynamic route slugs

Add `dynamicParams = false` to all landing page dynamic routes so
Next.js returns a proper 404 instead of a client-side exception for
slugs not in generateStaticParams.

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

* fix(home): remove duplicate handleStopGeneration declaration

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

---------

Co-authored-by: Theodore Li <theodoreqili@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…across sim and docs (#4170)

* improvement(seo): optimize sitemaps and robots.txt across sim and docs

- Add missing pages to sim sitemap: blog author pages, academy catalog and course pages
- Fix 6x duplicate URL bug in docs sitemap by deduplicating with source.getLanguages()
- Convert docs sitemap from route handler to Next.js metadata convention with native hreflang
- Add x-default hreflang alternate for docs multi-language pages
- Remove changeFrequency and priority fields (Google ignores both)
- Fix inaccurate lastModified timestamps — derive from real content dates, omit when unknown
- Consolidate 20+ redundant per-bot robots rules into single wildcard entry
- Add /form/ and /credential-account/ to sim robots disallow list
- Reference image sitemap in sim robots.txt
- Remove deprecated host directive from sim robots
- Move disallow rules before allow in docs robots for crawler compatibility
- Extract hardcoded docs baseUrl to env variable with production fallback

* fix(seo): remove homepage new Date(), guard latestModelDate empty array

* improvement(seo): consolidate DOCS_BASE_URL, optimize core web vitals

Extract hardcoded https://docs.sim.ai into shared DOCS_BASE_URL constant
in lib/urls.ts and replace all 20+ instances across layouts, metadata,
structured data, LLM manifest, sitemap, and robots files. Remove
OneDollarStats analytics script and tighten CSP for improved core web vitals.

* fix: removed onedollarstats from bun lock

* fix(seo): guard per-provider Math.max, consolidate docs robots to single wildcard
…4184)

* 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

* fix(gemini): support structured output with tools on Gemini 3 models

* fix(home): remove duplicate handleStopGeneration declaration

* refactor(gemini): use prefix-based Gemini 3 model detection

---------

Co-authored-by: Theodore Li <theodoreqili@gmail.com>
* feat(brightdata): add Bright Data integration with 8 tools

Add complete Bright Data integration supporting Web Unlocker, SERP API,
Discover API, and Web Scraper dataset operations. Includes scrape URL,
SERP search, discover, sync scrape, scrape dataset, snapshot status,
download snapshot, and cancel snapshot tools.

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

* fix(brightdata): address PR review feedback

- Fix truncated "Download Snapshot" description in integrations.json and docs
- Map engine-specific query params (num/count/numdoc, hl/setLang/lang/kl,
  gl/cc/lr) per search engine instead of using Google-specific params for all
- Attempt to parse snapshot_id from cancel/download response bodies instead
  of hardcoding null

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

* lint

* fix(agiloft): change bgColor to white; fix docs truncation

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

* fix(brightdata): avoid inner quotes in description to fix docs generation

The docs generator regex truncates at inner quotes. Reword the
download_snapshot description to avoid embedded double quotes.

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

* fix(brightdata): disable incompatible DuckDuckGo and Yandex URL params

DuckDuckGo kl expects region-language format (us-en) and Yandex lr
expects numeric region IDs (213), not plain two-letter codes. Disable
these URL-level params since Bright Data normalizes localization through
the body-level country param.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ist + cleanup (#4186)

Derive sidebar open state from selection validity instead of using a
separate useEffect. Also removes unnecessary useMemo/useCallback in
non-memo'd components, replaces useEffect with render-time reset in
dashboard, fixes CSS tokens, and adds hierarchical query key factory.

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.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 15, 2026 8:03pm

Request Review

@waleedlatif1 waleedlatif1 changed the title v0.6.45: v0.6.45: superagent, csp, brightdata integration, gemini response format, logs performance improvements Apr 15, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 15, 2026

Greptile Summary

This version bump bundles four independent changes: a new Bright Data integration (8 tools — scrape URL, SERP search, discover, sync/async dataset scraping, snapshot lifecycle), a fix for the Gemini 3 structured-output-with-tools path (responseJsonSchema instead of responseSchema), a logs sidebar fix that closes the panel when the selected log is filtered out, and a superagent credentials fix.

  • The download_snapshot tool extracts snapshotId from the scraped records array (data[0]?.snapshot_id), but those records contain domain data (products, profiles, etc.) — not snapshot metadata — so the output is always null. params.snapshotId should be used instead.

Confidence Score: 4/5

Safe to merge after fixing the download_snapshot snapshotId extraction bug; remaining findings are style-level.

One P1 logic issue in download_snapshot.ts where the snapshotId output will always be null because scraped records don't carry snapshot metadata. All other findings are P2.

apps/sim/tools/brightdata/download_snapshot.ts

Important Files Changed

Filename Overview
apps/sim/tools/brightdata/download_snapshot.ts Downloads Bright Data snapshot results; snapshotId in the output is extracted from scraped record data (which won't have that field) instead of from params.snapshotId, so it will always be null.
apps/sim/tools/brightdata/scrape_url.ts Scrapes a URL via Bright Data Web Unlocker; url output is always null instead of being populated from params.url.
apps/sim/tools/brightdata/discover.ts AI-powered web discovery tool; query output is hardcoded to null instead of params.query.
apps/sim/blocks/blocks/brightdata.ts New BrightData block config with 8 operations; correct use of user-only visibility for apiKey, proper switch-case params routing, and conditional subBlock visibility.
apps/sim/providers/gemini/core.ts Adds Gemini 3 structured output support alongside tools via responseJsonSchema; correctly guards with isGemini3Model and the schema persists through buildNextConfig spreads.
apps/sim/app/workspace/[workspaceId]/logs/logs.tsx Fixes sidebar staying open when selected log disappears from filtered list via effectiveSidebarOpen = isSidebarOpen && selectedLogIndex !== -1.
apps/sim/tools/brightdata/serp_search.ts SERP search tool supporting Google/Bing/DuckDuckGo/Yandex; correctly uses brd_json=1 pattern and maps engine-specific query params.
apps/sim/tools/brightdata/sync_scrape.ts Synchronous dataset scraper with correct handling of 202 async fallback and early return before second response.json() call.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[BrightData Block] --> B{operation}
    B -->|scrape_url| C[brightdata_scrape_url]
    B -->|serp_search| D[brightdata_serp_search]
    B -->|discover| E[brightdata_discover]
    B -->|sync_scrape| F[brightdata_sync_scrape]
    B -->|scrape_dataset| G[brightdata_scrape_dataset]
    B -->|snapshot_status| H[brightdata_snapshot_status]
    B -->|download_snapshot| I[brightdata_download_snapshot]
    B -->|cancel_snapshot| J[brightdata_cancel_snapshot]
    F -->|202| K[async: snapshotId]
    F -->|200| L[sync: data array]
    G --> K
    K --> H
    H -->|ready| I
    H -->|running| H
Loading

Reviews (1): Last reviewed commit: "fix(logs): close sidebar when selected l..." | Re-trigger Greptile

Comment on lines +87 to +92
output: {
content,
url: null,
statusCode: response.status,
},
}
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 url output always null

The url field in the output is hardcoded to null, but the output description says "The URL that was scraped." Since params.url is already available, it should be returned here so downstream blocks can reference it.

Suggested change
output: {
content,
url: null,
statusCode: response.status,
},
}
return {
success: true,
output: {
content,
url: params.url,
statusCode: response.status,
},
}

The same pattern applies to discover.ts (query: null instead of params.query) and download_snapshot.ts (snapshotId: (data[0]?.snapshot_id as string) ?? null instead of params.snapshotId).

Comment on lines +88 to +93
success: true,
output: {
data,
format: contentType,
snapshotId: (data[0]?.snapshot_id as string) ?? null,
},
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.

P1 snapshotId extracted from response records, not params

data[0]?.snapshot_id attempts to read a snapshot ID from the first downloaded record. Bright Data's download endpoint returns an array of scraped records (e.g., Amazon products, LinkedIn profiles), not snapshot metadata — individual records won't have a snapshot_id field. The value will be null on every successful download even though params.snapshotId already holds the correct ID.

Suggested change
success: true,
output: {
data,
format: contentType,
snapshotId: (data[0]?.snapshot_id as string) ?? null,
},
return {
success: true,
output: {
data,
format: contentType,
snapshotId: params.snapshotId ?? null,
},
}

Comment on lines +117 to +121
success: true,
output: {
results,
query: null,
totalResults: results.length,
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 query output always null

The query output is hardcoded to null even though params.query is available. The output description says "The search query that was executed," so returning params.query here would match the intent and allow downstream blocks to reference it.

Suggested change
success: true,
output: {
results,
query: null,
totalResults: results.length,
return {
success: true,
output: {
results,
query: params.query ?? null,
totalResults: results.length,
},
}

@Sg312 Sg312 merged commit 010435c 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.

3 participants