Commit bcedadf
feat(scheduled-tasks): calendar views + persisted, runnable tasks (#4979)
* improvement(resource): simplify table shell, toasts, and loading breadcrumbs
- Resource.Table: remove internal sorting (defaultSort/sortValues) and the
emptyMessage state — rows render in the order given, chrome always paints
- Resource: root is now the positioning context for overlays; consumers
(files, tables, knowledge, document) wrap detail views in <Resource>
instead of hand-rolled divs
- ResourceHeader: root titles no longer truncate during initial layout;
LocationFocusVeil gates the portal on mount to fix a hydration mismatch
- Toasts: drop the StackDismiss ring and stack countdown — each toast runs
its own timer; remove the Mod+E clear-notifications command; align toast
typography and icons with chip chrome
- Breadcrumbs: use the canonical '…' placeholder while names load
- incident.io: fix display name and catalog slug (with redirect)
- Add dev:capped / dev:full:capped scripts with a 4GB heap cap
* feat(scheduled-tasks): calendar views; rename Mothership to Sim/Chat
Add month/time calendar views for scheduled tasks with toolbar, event
chips, and a create-task modal, backed by calendar-grid and
schedule-events utils (with tests) and a use-calendar hook. Replace the
old schedule-modal/context-menu flow.
Rename the "Mothership" agent to "Sim" and the chat surface to "Chat"
across landing copy, constitution, block metadata, API error messages,
and copilot/data-drain internals. Drop unused workspace route layouts.
* fix(emcn): force dropdown menus modal inside dialogs so they scroll
A non-modal DropdownMenu portals outside an open dialog's
react-remove-scroll subtree, so its content cannot be wheel-scrolled
(e.g. the time picker in the scheduled-task create modal). ModalContent
now marks its subtree via an InsideModal context, and the emcn
DropdownMenu root upgrades itself to modal inside dialogs so it mounts
its own scroll lock and focus scope; page-level menus keep their
consumer-chosen modality.
Also stretch the create-task modal's date/time chip controls to full
width and drop the dead EDGE_GUTTER constant left behind by the
equal-tracks calendar layout.
* fix(scheduled-tasks): address review — midnight rollover, stub feedback, smooth Today scroll
- useCalendar: today was frozen at mount, so after midnight the isToday
column highlight and the current-time indicator stayed on the previous
day. today is now state refreshed by a sleep-resilient minute poll
that only re-renders when the calendar day actually changes
- CreateTaskModal: the stub submit closed silently, reading as false
success; it now shows an info toast that the task was not created
- ScheduleCalendar: Today presses scroll smoothly as an orientation
cue; mount and scope switches keep instant positioning
* feat(emcn): view-only field primitives + scheduled-task modals
- ChipCopyInput (canonical view-only copy field), ChipTimePicker,
ChipModalField type='copy', ChipTextarea viewOnly; new border chip
variant and shared chipPrimaryFillTokens
- migrate ~40 consumers off disabled inputs and the deleted
CopyableValueField; ChipConfirmModal description->text and
secondaryActions[] API sweep
- scheduled-tasks: rename create-task-modal to task-modal, add
task-details-modal + task-context-menu, useScheduledTasks hook
- home: extract prompt-editor (usePromptEditor) out of user-input
* feat(scheduled-tasks): persist + run tasks via the job-schedule backend
Wire the calendar UI to the existing sourceType='job' workflow_schedule
backend instead of local component state, so tasks persist and actually
run as Sim agent invocations.
- schema: add contexts (@-mentions resolved into the run), excludedDates
(per-occurrence deletes), and endsAt (recurrence end) to workflow_schedule
(migration 0235)
- contracts/schedules: expose one-time `time`, contexts, endsAt on create;
add the exclude_occurrence action; nullable cron in the create response
- orchestration: persist the new fields, honor exclusions + end boundary via
a shared computeNextRunAt, add performExcludeOccurrence
- execution: forward contexts to /api/mothership/execute and recompute the
next run through computeNextRunAt
- mothership/execute: accept + resolve contexts like the interactive chat path
- frontend: replace the local hook with React Query (create/update/delete +
exclude-occurrence), expand recurrences into calendar occurrences, add the
recurrence control (frequency + end) and the recurring this/all delete dialog
* chore(scheduled-tasks): satisfy biome line-width on user-input imports
* fix(scheduled-tasks): log agent-context resolution failures in execute route
* fix(scheduled-tasks): keep context double-cast adjacent to its boundary annotation
* fix(scheduled-tasks): preserve @-mention contexts on edit; sync editor valueRef on input
* fix(scheduled-tasks): footer-wrap modal controls; audit fixes; cleanup
- chip-modal: footer secondary cluster now wraps (min-w-0 flex-wrap) with a
non-shrinking action cluster, so scheduling controls can never clip Cancel/
primary; recurrence labels compacted so the common case stays one row
- schedule-execution: failure path now completes a recurring job when maxRuns/
endsAt/exclusions are exhausted (and a one-time/maxRuns job), mirroring the
success path instead of leaving it active with a stale nextRunAt
- prompt-editor: commitValue keeps valueRef in lockstep with state on the
mention-hook setter paths, completing the stale-ref fix
- task-modal: preserve @-mention contexts on edit (seed editor.setContexts);
single emptiness source of truth
- recurrence-control: preserve prior count when toggling end type; drop a
needless useMemo
- contracts: reuse scheduleContextSchema for the execute contexts shape
* feat(scheduled-tasks): valid future default launch time; test scheduleToTasks mapping
* chore(scheduled-tasks): convert added inline comments to TSDoc
* simplify(scheduled-tasks): reuse date-fns for launch/end math; drop dead 'running' status + single-use helper
---------
Co-authored-by: waleed <walif6@gmail.com>1 parent 7b5c776 commit bcedadf
169 files changed
Lines changed: 22351 additions & 3485 deletions
File tree
- .claude/rules
- apps
- docs/content/docs/en/integrations
- sim
- app
- (landing)/components
- features
- hero
- landing-preview/components
- landing-preview-home
- landing-preview-panel
- api
- files
- presigned
- upload
- mothership/execute
- schedules
- [id]
- llms.txt
- playground
- workspace/[workspaceId]
- components
- credential-detail
- components
- resource
- components
- resource-chrome-fallback
- resource-header
- files
- components/delete-confirm-modal
- home/components
- message-content
- components/thinking-block
- user-input
- components
- prompt-editor
- integrations
- components/connect-service-account-modal
- connected/[credentialId]
- knowledge
- [id]
- [documentId]
- components/delete-chunk-modal
- components
- base-tags-modal
- connectors-section
- components/delete-knowledge-base-modal
- logs
- components/dashboard/components/workflows-list
- providers
- scheduled-tasks
- components
- create-schedule-modal
- schedule-calendar
- components
- calendar-event-chip
- calendar-toolbar
- month-grid
- time-grid
- task-delete-dialog
- task-details-modal
- task-modal
- hooks
- utils
- settings
- [section]
- components
- api-keys
- byok
- copilot
- credential-sets
- custom-tools
- inbox/components/inbox-enable-toggle
- mcp
- components/mcp-server-form-modal
- team-management/components
- manage-credits-modal
- remove-member-dialog
- workflow-mcp-servers
- secrets/[credentialId]
- skills
- components/skill-modal
- tables
- [tableId]
- components/row-modal
- utils
- w
- [workflowId]/components
- panel
- components
- deploy/components/deploy-modal
- components
- chat
- general
- components
- editor/components/sub-block/components/tool-input/components/custom-tool-modal
- terminal
- components
- output-panel
- components/sidebar
- components
- settings-sidebar
- workflow-list/components/delete-modal
- workspace-header
- background
- blocks/blocks
- components/emcn
- components
- calendar
- chip-copy-input
- chip-date-picker
- chip-modal
- chip-textarea
- chip-time-picker
- chip
- toast
- icons
- ee
- access-control/components
- data-drains/components
- whitelabeling
- executor/handlers/mothership
- hooks/queries
- lib
- api/contracts
- copilot
- request/lifecycle
- tools
- handlers
- mcp
- data-drains/sources
- integrations
- logs
- mothership/inbox
- workflows/schedules
- public
- stores/terminal/console
- packages/db
- migrations
- meta
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
71 | | - | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
0 commit comments