Commit Graph
2502 Commits
Author SHA1 Message Date
waleed f62fddfac5 improvement(settings): add search bar to skeleton loading states
Skeletons now include the search bar (and action button where applicable) so the layout matches the final component 1:1. Eliminates layout shift when the dynamic chunk loads — search bar area is already reserved by the skeleton.
2026-03-09 20:45:35 -07:00
waleed 5184580dbd Merge branch 'improvement/settings-perf' into feat/mothership-copilot 2026-03-09 20:35:39 -07:00
waleed 1aa9dc9ea7 fix(settings): use emcn Input for file input in general settings 2026-03-09 20:34:52 -07:00
waleed 37a1d66127 fix(byok): use ui Input for search bar to match other settings pages 2026-03-09 20:33:03 -07:00
waleed 5a5bf5ca7e fix(byok): use EMCN Input for search field instead of ui Input
Replace @/components/ui Input with the already-imported EmcnInput for design-system consistency.
2026-03-09 20:29:45 -07:00
waleed 4ccc1e5997 fix(settings): include theme sync in client-side prefetch queryFn
Hover-based prefetchGeneralSettings now calls syncThemeToNextThemes, matching the useGeneralSettings hook behavior so theme updates aren't missed when prefetch refreshes stale cache.
2026-03-09 20:29:06 -07:00
waleed 80f032b9be update byok page 2026-03-09 20:22:45 -07:00
waleed 63927e5afc fix(settings): extract shared response mappers to prevent server/client shape drift
Addresses PR review feedback — prefetch.ts duplicated response mapping logic from client hooks. Extracted mapGeneralSettingsResponse and mapUserProfileResponse as shared functions used by both client fetch and server prefetch.
2026-03-09 20:21:43 -07:00
waleed ab61f5188c fix(settings): use emcn Skeleton in extracted skeleton files 2026-03-09 20:09:19 -07:00
waleedandClaude Opus 4.6 94914b848e fix: bust browser cache for workspace file downloads
The downloadFile function was using a plain fetch() that honored the
aggressive cache headers, causing newly created files to download empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:07:27 -07:00
waleed 4c7e63cf7a improvement(settings): SSR prefetch, code splitting, dedicated skeletons 2026-03-09 20:01:29 -07:00
8fc75a6e9d feat(hosted-key-services) Add hosted key for multiple services (#3461)
* feat(hosted keys): Implement serper hosted key

* Handle required fields correctly for hosted keys

* Add rate limiting (3 tries, exponential backoff)

* Add custom pricing, switch to exa as first hosted key

* Add telemetry

* Consolidate byok type definitions

* Add warning comment if default calculation is used

* Record usage to user stats table

* Fix unit tests, use cost property

* Include more metadata in cost output

* Fix disabled tests

* Fix spacing

* Fix lint

* Move knowledge cost restructuring away from generic block handler

* Migrate knowledge unit tests

* Lint

* Fix broken tests

* Add user based hosted key throttling

* Refactor hosted key handling. Add optimistic handling of throttling for custom throttle rules.

* Remove research as hosted key. Recommend BYOK if throtttling occurs

* Make adding api keys adjustable via env vars

* Remove vestigial fields from research

* Make billing actor id required for throttling

* Switch to round robin for api key distribution

* Add helper method for adding hosted key cost

* Strip leading double underscores to avoid breaking change

* Lint fix

* Remove falsy check in favor for explicit null check

* Add more detailed metrics for different throttling types

* Fix _costDollars field

* Handle hosted agent tool calls

* Fail loudly if cost field isn't found

* Remove any type

* Fix type error

* Fix lint

* Fix usage log double logging data

* Fix test

* Add browseruse hosted key

* Add firecrawl and serper hosted keys

* feat(hosted key): Add exa hosted key (#3221)

* feat(hosted keys): Implement serper hosted key

* Handle required fields correctly for hosted keys

* Add rate limiting (3 tries, exponential backoff)

* Add custom pricing, switch to exa as first hosted key

* Add telemetry

* Consolidate byok type definitions

* Add warning comment if default calculation is used

* Record usage to user stats table

* Fix unit tests, use cost property

* Include more metadata in cost output

* Fix disabled tests

* Fix spacing

* Fix lint

* Move knowledge cost restructuring away from generic block handler

* Migrate knowledge unit tests

* Lint

* Fix broken tests

* Add user based hosted key throttling

* Refactor hosted key handling. Add optimistic handling of throttling for custom throttle rules.

* Remove research as hosted key. Recommend BYOK if throtttling occurs

* Make adding api keys adjustable via env vars

* Remove vestigial fields from research

* Make billing actor id required for throttling

* Switch to round robin for api key distribution

* Add helper method for adding hosted key cost

* Strip leading double underscores to avoid breaking change

* Lint fix

* Remove falsy check in favor for explicit null check

* Add more detailed metrics for different throttling types

* Fix _costDollars field

* Handle hosted agent tool calls

* Fail loudly if cost field isn't found

* Remove any type

* Fix type error

* Fix lint

* Fix usage log double logging data

* Fix test

---------

Co-authored-by: Theodore Li <teddy@zenobiapay.com>

* Fail fast on cost data not being found

* Add hosted key for google services

* Add hosting configuration and pricing logic for ElevenLabs TTS tools

* Add linkup hosted key

* Add jina hosted key

* Add hugging face hosted key

* Add perplexity hosting

* Add broader metrics for throttling

* Add skill for adding hosted key

* Lint, remove vestigial hosted keys not implemented

* Revert agent changes

* fail fast

* Fix build issue

* Fix build issues

* Fix type error

* Remove byok types that aren't implemented

* Address feedback

* Use default model when model id isn't provided

* Fix cost default issues

* Remove firecrawl error suppression

* Restore original behavior for hugging face

* Add mistral hosted key

* Remove hugging face hosted key

* Fix pricing mismatch is mistral and perplexity

* Add hosted keys for parallel and brand fetch

* Add brandfetch hosted key

* Update types

* Change byok name to parallel_ai

* Add telemetry on unknown models

---------

Co-authored-by: Theodore Li <theo@sim.ai>
2026-03-09 22:56:45 -04:00
Vikhyath Mondreti 9400df6085 Merge branch 'feat/mothership-copilot' of github.com:simstudioai/sim into feat/mothership-copilot 2026-03-09 19:23:06 -07:00
Vikhyath Mondreti d23afb97c5 fix(credentials): block usage at execution layer without perms + fix invites 2026-03-09 19:22:35 -07:00
Siddharth Ganesan 1ff89cd416 Table batch ops 2026-03-09 19:04:30 -07:00
waleed b7a6fe574c small table rename bug, files updates not persisting 2026-03-09 18:38:40 -07:00
Siddharth Ganesan 8abe717b85 Fix table column delete 2026-03-09 18:25:07 -07:00
Emir Karabeg d815568315 improvement: tables, chat 2026-03-09 18:23:52 -07:00
waleed 86b67823ce update docs 2026-03-09 18:21:53 -07:00
Vikhyath Mondreti 65448766fc Merge branch 'feat/mothership-copilot' of github.com:simstudioai/sim into feat/mothership-copilot 2026-03-09 18:03:49 -07:00
Vikhyath Mondreti 9098f0b805 fix(credentials): exclude regular login methods from credential sync 2026-03-09 18:03:25 -07:00
waleed 78e3d840dd updated document icon 2026-03-09 18:00:26 -07:00
waleed 09af6fb33d improve resizer for file preview for html files 2026-03-09 17:48:01 -07:00
Emir Karabeg 523aff8ab0 improvements(tables): styling improvements 2026-03-09 17:46:27 -07:00
Emir Karabeg 4fe9509e70 styling alignment 2026-03-09 17:46:27 -07:00
Emir Karabeg 9a1cb10d7a improvement(ui): consistent styling 2026-03-09 17:46:27 -07:00
Theodore LiandTheodore Li 898f8ce1c1 feat(exa-hosted-key): Restore exa hosted key (#3499)
Co-authored-by: Theodore Li <theo@sim.ai>
2026-03-09 20:40:54 -04:00
Waleed 39334bdf7d fix(tables): one small tables ting (#3497) 2026-03-09 16:43:15 -07:00
WaleedandClaude Opus 4.6 a6d3b3a9ad improvement(tables): click-to-select navigation, inline rename, column resize (#3496)
* improvement(tables): click-to-select navigation, inline rename, column resize

* fix(tables): address PR review comments

- Add doneRef guard to useInlineRename preventing Enter+blur double-fire
- Fix PATCH error handler: return 500 for non-validation errors, fix unreachable logger.error
- Stop click propagation on breadcrumb rename input

* fix(tables): add rows-affected check in renameTable service

Prevents silent no-op when tableId doesn't match any record.

* fix(tables): useMemo deps + placeholder memo initialCharacter check

- Use primitive editingId/editValue in useMemo deps instead of whole
  useInlineRename object (which creates a new ref every render)
- Add initialCharacter comparison to placeholderPropsAreEqual, matching
  the existing pattern in dataRowPropsAreEqual

* fix(tables): address round 2 review comments

- Mirror name validation (regex + max length) in PatchTableSchema so
  validateTableName failures return 400 instead of 500
- Add .returning() + rows-affected check to renameWorkspaceFile,
  matching the renameTable pattern
- Check response.ok before parsing JSON in useRenameWorkspaceFile,
  matching the useRenameTable pattern

* refactor(tables): reuse InlineRenameInput in BreadcrumbSegment

Replace duplicated inline input markup with the shared component.
Eliminates redundant useRef, useEffect, and input boilerplate.

* fix(tables): set doneRef in cancelRename to prevent blur-triggered save

Escape → cancelRename → input unmounts → blur → submitRename would
save instead of canceling. Now cancelRename sets doneRef like
submitRename does, blocking the subsequent blur handler.

* fix(tables): pointercancel cleanup + typed FileConflictError

- Add pointercancel handler to column resize to prevent listener leaks
  when system interrupts the pointer (touch-action override, etc.)
- Replace stringly-typed error.message.includes('already exists') with
  FileConflictError class for refactor-safe 409 status detection

* fix(tables): stable useCallback dep + rename shadowed variable

- Use listRename.startRename (stable ref) instead of whole listRename
  object in handleContextMenuRename deps
- Rename inner 'target' to 'origin' in arrow-key handler to avoid
  shadowing the outer HTMLElement 'target'

* fix(tables): move class below imports, stable submitRename, clear editingCell

- Move FileConflictError below import statements (import-first convention)
- Make submitRename a stable useCallback([]) by reading editingId and
  editValue through refs (matches existing onSaveRef pattern)
- Add setEditingCell(null) to handleEmptyRowClick for symmetry with
  handleCellClick

* feat(tables): persist column widths in table metadata

Column widths now survive navigation and page reloads. On resize-end,
widths are debounced (500ms) and saved to the table's metadata field
via a new PUT /api/table/[tableId]/metadata endpoint. On load, widths
are seeded from the server once via React Query.

* fix type checking for file viewer

* fix(tables): address review feedback — 4 fixes

1. headerRename.onSave now uses the fileId parameter directly instead
   of the selectedFile closure, preventing rename-wrong-file race
2. updateMetadataMutation uses ref pattern matching mutateRef/createRef
3. Type-to-enter filters non-numeric chars for number columns, non-date
   chars for date columns
4. renameValue only passed to actively-renaming ColumnHeaderMenu,
   preserving React.memo for other columns

* fix(tables): position-based gap rows, insert above/below, consistency fixes

- Fix gap row insert shifting: only shift rows when target position is
  occupied, preventing unnecessary displacement of rows below
- Switch to position-based indexing throughout (positionMap, maxPosition)
  instead of array-index for correct sparse position handling
- Add insert row above/below to context menu
- Use CellContent for pending values in PositionGapRows (matching PlaceholderRows)
- Add belowHeader selection overlay logic to PositionGapRows
- Remove unnecessary 500ms debounce on column width persistence

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

* fix cells nav w keyboard

* added preview panel for html, markdown rendering, completed table

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 16:37:48 -07:00
Emir Karabeg 8fd8b1a248 improvement(mothership): chat history and stability 2026-03-09 15:57:13 -07:00
Emir Karabeg 917af6d141 improvement(mothership): chat stability 2026-03-09 15:42:12 -07:00
Vikhyath Mondreti fe5f809e1a Merge branch 'feat/mothership-copilot' of github.com:simstudioai/sim into feat/mothership-copilot 2026-03-09 15:28:07 -07:00
Vikhyath Mondreti 2f2c2b05e8 feat(templates): landing page templates workflow states 2026-03-09 15:22:14 -07:00
Siddharth Ganesan 0c44332172 File uploads to mothership 2026-03-09 15:19:56 -07:00
Siddharth Ganesan 7c0cd36936 Fix error status 2026-03-09 14:30:46 -07:00
Siddharth Ganesan 2788c68e45 Tool results 2026-03-09 14:24:44 -07:00
Siddharth Ganesan cf9cc0377d Fix tool call persistence in chat 2026-03-09 14:24:44 -07:00
Emir Karabeg a091149da4 improvement(mothership): worklfow resource 2026-03-09 14:20:59 -07:00
Waleed 64cedfcff7 fix(streaming): smoother streaming with throttled rendering, ResizeObserver scroll, and batched updates (#3471)
* fix(streaming): smoother streaming with throttled rendering, ResizeObserver scroll, and batched updates

- Add useThrottledValue hook (100ms trailing-edge throttle) to gate DOM re-renders during streaming across all chat surfaces
- Replace 100ms setInterval scroll polling with ResizeObserver-based auto-scroll, programmatic scroll timestamp tracking, and nested [data-scrollable] region handling
- Extract processContentBuffer from inline content handler for cleaner code organization in copilot SSE handlers
- Add RAF-based update batching (50ms max interval) to floating chat and home chat streaming paths
- Add useProgressiveList hook for progressive rendering of long conversation histories via requestAnimationFrame

Made-with: Cursor

* ack PR comments

* fix search modal

* more comments

* ack comments

* count

* ack comments

* ack comment
2026-03-09 13:27:33 -07:00
Vikhyath Mondreti 15db69231f fix tests 2026-03-09 12:22:40 -07:00
Vikhyath Mondreti 7b43091984 Merge branch 'feat/mothership-copilot' of github.com:simstudioai/sim into feat/mothership-copilot 2026-03-09 12:13:34 -07:00
Emir Karabeg 48f280427e feat(mothership): resource viewer 2026-03-09 12:07:06 -07:00
Vikhyath Mondreti 1430eb66de fix(landing): wire agent input to mothership 2026-03-09 11:58:16 -07:00
Siddharth Ganesan 2ace7252f9 Store tool call results 2026-03-09 11:35:20 -07:00
Siddharth Ganesan bcdfc85ccb Tool updates 2026-03-09 11:28:22 -07:00
Vikhyath Mondreti e921448bf2 fix(selections): more nested folder inaccuracies 2026-03-09 11:17:43 -07:00
Vikhyath Mondreti 71d8e227bd improvement(folder-selection): folder deselection + selection order should match visual 2026-03-09 11:00:22 -07:00
Siddharth Ganesan 4593a8a471 Table tools 2026-03-09 10:21:12 -07:00
Emir Karabeg 301fdb94ff improvement(tables): multi-select and efficiencies 2026-03-09 10:07:21 -07:00
Emir Karabeg 4afc3bbff8 improvement: logs 2026-03-09 09:13:01 -07:00