feat(web): add Company Brain automation settings#1316
Conversation
Add recurring automation templates, creation and editing, Slack destination and default-channel controls, DST-aware GMT-labelled timezone selection, ownership and Slack-origin labels, and explicit loading and error states.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | f20c541 | Commit Preview URL Branch Preview URL |
Jul 20 2026, 08:14 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | f20c541 | Jul 20 2026, 08:13 PM |
How to use the Graphite Merge QueueAdd the label Main to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Claude finished @MaheshtheDev's task in 1m 58s —— View job Reviewing PR #1316
Review complete. No critical issues found. The code is well-structured with:
The Graphite comment about timezone validation is a reasonable defensive improvement but not a blocker — invalid timezones would only occur from corrupted backend data since the dropdown only shows valid IANA zones. Score: 10/10 — Good to ship. |
There was a problem hiding this comment.
Overview: Adds recurring automation templates, default channel settings, DST-aware timezone selection, and loading/error states for the Company Brain automations UI.
Issues found: None — this looks good to ship.
The code is well-structured:
- Domain logic is cleanly extracted to
domain.tswith proper type definitions and pure utility functions - Input validation is thorough (cron parsing, timezone validation, URL protocol checks)
- Error handling is consistent across all API calls with proper user feedback
- The
sourceThreadUrllink correctly validates forhttps://before rendering, preventing protocol injection - Loading and error states are explicit with retry functionality
- The "advanced cron" preservation logic correctly handles Slack-created schedules that fall outside the simple web editor
Score: 10/10
| draft.rawCron ?? toLocalCron(draft.time, draft.frequency, draft.weekday) | ||
| if (!cron) throw new Error("Pick a valid time.") | ||
| if (!draft.timezone.trim()) throw new Error("Enter an IANA timezone.") | ||
| return { |
There was a problem hiding this comment.
Missing timezone validation before sending to backend. While the timezone field is checked for non-empty string, there's no validation that it's a valid IANA timezone identifier. If an invalid timezone somehow ends up in draft state (from corrupted data, old automations, or edge cases in the memoization logic at lines 252-262), it will be sent to the backend and could cause server-side failures.
// Add validation:
if (!draft.timezone.trim()) throw new Error("Enter an IANA timezone.")
try {
// Validate timezone is supported
new Intl.DateTimeFormat('en-US', { timeZone: draft.timezone }).format(new Date())
} catch {
throw new Error("Enter a valid IANA timezone.")
}This validation should occur before the body is constructed to prevent invalid timezones from reaching the API.
| draft.rawCron ?? toLocalCron(draft.time, draft.frequency, draft.weekday) | |
| if (!cron) throw new Error("Pick a valid time.") | |
| if (!draft.timezone.trim()) throw new Error("Enter an IANA timezone.") | |
| return { | |
| draft.rawCron ?? toLocalCron(draft.time, draft.frequency, draft.weekday) | |
| if (!cron) throw new Error("Pick a valid time.") | |
| if (!draft.timezone.trim()) throw new Error("Enter an IANA timezone.") | |
| try { | |
| new Intl.DateTimeFormat('en-US', { timeZone: draft.timezone }).format(new Date()) | |
| } catch { | |
| throw new Error("Enter a valid IANA timezone.") | |
| } | |
| return { | |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
Drop the default-channel card and fold the picker into the "Your automations" header row as a borderless text control, so the section starts with content instead of a set-once org setting. Move Timezone into the Frequency/Time row and put its GMT/DST helper behind the same Info tooltip pattern used by "Deliver to". Row wraps so the weekly "Day" field doesn't crush it. Also render channel names as #name rather than "# name".
There was a problem hiding this comment.
Overview: Adds recurring automation templates, default channel settings, DST-aware timezone selection, and loading/error states for the Company Brain automations UI.
Issues found: None critical. The Graphite comment about timezone validation is a reasonable defensive improvement — adding Intl.DateTimeFormat validation would catch edge cases where corrupted backend data contains an invalid IANA identifier. However, this is low-risk since:
- The dropdown only shows valid timezones from
Intl.supportedValuesOf("timeZone") - New automations use the browser's timezone (always valid)
- Invalid data would need to originate from the backend
The code is well-structured:
- Domain logic cleanly extracted to
domain.tswith proper type definitions toLocalCron/fromLocalCronhave thorough input validation (hours 0-23, minutes 0-59, weekdays 0-6)sourceThreadUrlcorrectly validates forhttps://prefix before rendering, preventing protocol injection- Error handling is consistent with user-friendly messages and retry functionality
- The "advanced cron" preservation correctly handles Slack-created schedules outside the simple web editor
Score: 10/10

Add recurring automation templates, creation and editing, Slack destination and default-channel controls, DST-aware GMT-labelled timezone selection, ownership and Slack-origin labels, and explicit loading and error states.