Matthew Meszaros
875cea477f
feat: give a duplicate IMAP folder id its own error code and guidance instead of reusing the folder-limit one, because the two problems have different fixes: getting under the folder cap versus renaming the folder the mail server gave a duplicate UIDVALIDITY, and the drawer was telling a user to delete folders when neither the cap nor deleting anything was involved
2026-09-07 03:42:57 -07:00
Matthew Meszaros
5a49a39980
feat: state that the IMAP folder ranking applies whether or not the listing exceeds the cap, because the sync pass walks folders in that order and can run out of budget partway, so an outreach reply in the inbox should land before a mailing list in a user folder whatever order the server listed them in, and correct the under-cap test whose comment claimed the opposite of what it asserted
2026-09-07 03:36:34 -07:00
Matthew Meszaros
883178718e
feat: address the CodeRabbit review on the IMAP compatibility PR by guarding the NIL hierarchy delimiter so a server that reports none is not given a NUL separator that hides the leaf fallback and loses the Sent folder, serializing the idle connection's deadline state under a mutex so a warmup action finishing cannot clear the deadline out from under a sync fetch still in flight on the same session, and threading the delimiter the server itself reports through the folder classification so a folder under a separator other than a dot or a slash is recognized instead of filing as inbox
2026-09-07 03:27:50 -07:00
Matthew Meszaros
90f5e8c625
feat: follow only one folder per UIDVALIDITY on IMAP, because the folder row is keyed on that id while RFC 3501 only promises UIDs are stable within a folder, so a server that derives it from the creation time gives a folder tree made in one second a single shared id and the two folders would advance each other's cursor and delete each other's row; the inbox and special folders win the collision, the dropped folder is reported in the mailbox drawer and named in the worker log, and the folder classification, ranking and localized-name matching gain direct tests
2026-09-07 03:20:46 -07:00
Matthew Meszaros
0df1a57589
feat: renumber the unibox_mailboxes uid_next migration from 000131 to 000132 after the campaign continuous lead sources migration took 000131 on main, so golang-migrate does not refuse to build its source driver once both are merged
2026-09-07 03:15:06 -07:00
Matthew Meszaros
1a87720d5a
merge
2026-09-07 03:14:42 -07:00
Matthew Meszaros
f2c35cf872
feat: sync every kind of IMAP mailbox (issues #345-#349): connect servers without CONDSTORE by following UIDNEXT per folder and mirroring read state with a periodic flag scan, so Outlook.com, Microsoft 365 over IMAP and Yahoo work instead of failing at load; fall back to a STATUS per folder when the server has no LIST-STATUS, which silently made an account look empty; bound the wait between IMAP responses so a peer that vanishes without a FIN cannot park a command forever; keep the inbox and special folders when a mailbox has more folders than the cap (raised to 100) and relay the overflow as a warning instead of failing the mailbox silently; recognize localized folder names and the server's own hierarchy delimiter so a Sent folder called Gesendete Elemente is not filed as inbox; and back off on a widening interval while a mail server is unreachable so one outage is one warning rather than one a minute
2026-09-07 03:12:22 -07:00
Matthew Meszaros
fb7cf397db
Merge remote-tracking branch 'origin/main' into fix/campaign-restart-keep-running
2026-09-07 03:05:06 -07:00
Matthew Meszaros
889b96c38e
feat: address the CodeRabbit review on the campaign restart PR by turning on Keep running for a form's campaign only after every field is validated and failing the form save on any error other than a foreign campaign, running the automation's campaign flip before the automation is saved and failing the save visibly when the campaign is not the workspace's or the flip does not land, and clarifying in the error-code table and the campaigns API reference that no_leads covers a campaign that never had a lead while one whose leads all finished starts and waits
2026-09-07 02:55:12 -07:00
Matthew Meszaros
5d60fe9a21
feat: fix campaign restart dead end (issue #340 ): resolve preflight tracking senders through the same explicit/tags/all pool the scheduler uses so a connected mailbox is never reported missing, fetch the launch dialog's step count from the steps endpoint instead of a field the campaign API never returns, turn on Keep running for new leads when a form or an automation feeds a campaign (migration 000131 backfills existing ones) and when a member starts a campaign whose every lead has finished so it goes active and waits for leads instead of answering 400, return waiting_for_leads from the start endpoint for the dialog's success screen, and document the no_leads and no_remaining_leads codes and the new behaviour in the campaigns, forms, automations and API docs
2026-09-07 02:26:50 -07:00
SUMAN JANA
61348a55f7
fix(worker): reuse only an authenticated IMAP session; drain LIST on the folder cap
...
Address review:
- ensureConnected kept any client not in Logout, so a session whose Login
failed (NotAuthenticated) was reused instead of re-dialed. Reuse only
Authenticated or Selected, and close the half-open session when auth or
the CONDSTORE check fails.
- Folders returned from inside the LIST loop on the folder cap without
closing the command, leaving unread results to stall the next command.
2026-09-07 07:25:21 +00:00
SUMAN JANA
5eaf4481d5
Merge branch 'fix/imap-dead-session-reconnect' of https://github.com/rocker1166/warmbly into fix/imap-dead-session-reconnect
2026-09-07 07:15:49 +00:00
SUMAN JANA
b9fa144d1c
fix(worker): guard the IMAP client across reconnects; Gmail-only name fallback
...
Address review:
- The client field was read by commands while ensureConnected could swap
it. A lifecycle RWMutex now holds the write lock through dial, auth and
assignment, and every command holds the read lock for its duration.
Lock order is mu before lifecycle; sentMailbox resolves under mu before
AppendToSent takes the read lock.
- The virtual-folder name fallback applied to any server, so a plain IMAP
account with a real folder called "Important" or "Starred" would have
been dropped from sync. It now applies only inside Gmail's own
"[Gmail]/" and "[Google Mail]/" namespace; regression cases added.
2026-09-07 07:15:20 +00:00
Suman Jana
c347d34d5a
Merge branch 'main' into fix/imap-dead-session-reconnect
2026-09-07 12:38:52 +05:30
SUMAN JANA
04d73acafd
fix(worker): reconnect dropped IMAP sessions and sync nested Gmail folders
...
The worker opened one IMAP session per mailbox at load and never re-dialed.
When the server dropped it (Gmail does after a while), handleError mapped
net.ErrClosed to nil, so every pass ran as a clean "no folders" pass:
nothing logged, no error record, last_synced_at kept moving, no new mail
for days, and sent copies failed with "use of closed network connection".
- imap.Client: ensureConnected re-dials a client parked in Logout state;
every entry point (Folders, AppendToSent, warmup actions) runs through it.
- handleError: transport errors return a retryable server-unreachable
error instead of nil, so the sync loop logs and retries.
- Folders: LIST "*" instead of "%", which stopped at the top level and
never reached [Gmail]/Sent Mail (or Dovecot's INBOX.*); request
SPECIAL-USE, without which Gmail reports no \Sent/\Trash/\Junk/\All.
- Sync: skip Gmail's virtual label views (All Mail, Starred, Important)
so known mail is not re-filed as archive under a different UID; retire
a cursor an earlier build baselined for them. "Bin" is trash.
2026-09-07 06:44:54 +00:00
Matthew Meszaros
54b5cba9a5
feat: address the CodeRabbit review on the continuous campaigns PR by clearing idle_since in the same update that turns the continuous setting off so the dashboard stops reading a campaign as waiting for leads, adding idle_since to the documented campaign response, qualifying the start endpoint's nothing-left-to-send 400 for continuous campaigns, and noting in the automations and forms guides that a finished campaign restarts through the launch checks and a refusal is written to its activity log
2026-09-06 02:58:33 -07:00
Matthew Meszaros
7b11489c85
feat: keep a campaign running for new leads (issue #336 ): add a continuous campaign setting (migration 000130, on by default once a segment is linked) under which a campaign that runs out of leads stays active and idle with idle_since set instead of finishing, is startable with no leads, is re-checked by the reconciler every pass and shows as waiting for leads in the dashboard list, header and live activity panel with a CAMPAIGN_IDLE realtime event; make WakeCampaigns restart a finished campaign through the full launch checks so a lead added by the contacts API, a bulk update, an import or the add-to-campaign automation action reopens it exactly like a linked segment does, and write a refused restart to the campaign activity log once an hour per reason instead of only the backend log; expose continuous on the campaign API and preferences page and document it in the campaigns, segments, forms, automations, API reference and realtime docs
2026-09-06 02:50:16 -07:00
Matthew Meszaros
41413afa2a
feat: keep a failed contact lookup distinguishable from a missing contact in the native automation actions by wrapping the repository error instead of folding it into the no-contact-matched message, as CodeRabbit's follow-up on the lead-intake PR pointed out
2026-09-06 00:54:05 -07:00
Matthew Meszaros
04a2ed59c9
feat: address the CodeRabbit review on the lead-intake PR by giving the webhook sink its own copy of every map payload so the automation goroutine never writes into the map still being marshalled for endpoint delivery, propagating contact lookup errors in the upsert action's skip mode and in the native actions adapter so a failed lookup is never mistaken for a missing contact, adding the contacts source CHECK as NOT VALID in migration 000129 to skip the table scan under the migration lock, defaulting a new create-or-update-contact node's email template to the address key the chosen trigger actually carries, correcting the n8n guide on which lead-form sources have a trigger node, naming API batches over 100 contacts among the silent bulk arrivals in the contacts guide, and updating the marketing automations page from nine to twelve triggers
2026-09-06 00:47:33 -07:00
Matthew Meszaros
a3989f9d9c
feat: turn automations into a lead-intake path so a Facebook, Instagram, LinkedIn or TikTok lead form pushed by Zapier, Make, n8n or any webhook becomes a tagged, campaign-enrolled contact without leaving Warmbly: add the warmbly.upsert_contact and warmbly.add_to_campaign built-in actions with templated field mapping, custom fields, tags, campaign and an if-exists policy, fire a rich contact.created event from the one contact write path (silent for file imports, sheet syncs and API batches over 100) and expose contact.created and form.submitted as automation triggers with condition fields, variables and sample data, carry an automation depth through events raised by an action so a flow that creates a contact cannot re-trigger itself past five hops, stamp automation-created contacts with the new automation source (migration 000129), share the campaign picker between the sheet sync wizard and the automation builder, document lead intake in the automations, Zapier, Make, contacts, forms, integrations, expressions and webhook pages plus a new n8n guide, mirror the new triggers and actions on the marketing automations page, and drop the 34 MB cli binary that was committed by mistake
2026-09-06 00:36:05 -07:00
Matthew Meszaros
508ee741cf
Merge remote-tracking branch 'origin/main' into fix/salvage-expired-batch
2026-09-05 21:33:20 -07:00
Matthew Meszaros
c88118661f
feat: record an admin cancel on a warmup generation batch job through a conditional MarkBatchCancelling update that only touches a job still running with a non-terminal batch status, so a cancel racing the poller can no longer overwrite the completed state and counts the poller just wrote or send the job back into the active set to be ingested twice
2026-09-05 21:24:11 -07:00
Matthew Meszaros
b0c090e521
feat: keep an admin-cancelled warmup generation batch job running with batch_status cancelling instead of marking it failed on the spot, so PollBatches reaches the cancelled branch that PR 333 added and ingests the conversations OpenAI finished before the cancel landed while the admin's reason survives the ingest, refuse a second cancel on a batch already cancelling, hide the admin Cancel button while a batch is cancelling, and refresh the PollBatches, CancelBatch and WarmupBatchPoller doc comments that still said expired and cancelled batches are marked failed
2026-09-05 21:14:46 -07:00
joao-crm
9b44f84fb2
feat: ingest what an expired or cancelled warmup generation batch did finish instead of discarding it, since OpenAI still hands back the requests it completed before the window closed and the poller was marking the job failed with zero generated while a paid output file sat unread, with the terminal-batch decision lifted into endedBatchOutcome so the reason is recorded alongside the salvaged rows
2026-09-05 15:43:07 +00:00
Matthew Meszaros
3bf8d4bdfa
Merge remote-tracking branch 'origin/main' into feature/mailbox-fair-use-allowance
2026-09-04 21:25:53 -07:00
Matthew Meszaros
c7da25d126
fix: never leave a per-IP rate-limit counter without a TTL, which would block that address forever once it passed the limit, by dropping the key and failing open when EXPIRE fails and repairing a missing expiry on the reject path, and assert the exit status as well as the message when the CLI installer rejects a flag
2026-09-04 21:12:27 -07:00
Matthew Meszaros
bf46839fb7
feat: address the CodeRabbit review on the mailbox allowance work by reserving the mailbox slot inside the account insert transaction under a per-organization lock so concurrent connects cannot both take the last one, resolving the storage limit under the quota lock so a plan change cannot be raced past, deleting refused attachment objects on a context that outlives the request, settling already-connected rows before the bulk batch spends allowance, leaving password columns out of the failed-rows CSV, stopping click propagation from the portalled allowance dialog, and counting bulk progress once
2026-09-04 21:11:25 -07:00
Matthew Meszaros
b35e111705
fix: address the review on the CLI PR: give the sign-in handshake its own per-IP budget so a 200-poll login cannot lock the address out of the browser login, keep https for a remote host that names a port instead of sending a bearer token in cleartext, report truncation when a paginated walk stops at max-pages, accept a piped secret with no trailing newline, normalise WEBSOCKET_URL on its suffix so a bare /socket becomes a real endpoint, destroy a minted secret the moment its code expires, gate cli-installer-ci on the required status check, print a rejected flag instead of an unbound-variable error, and use a portable sha256 so the packaging runs on macOS
2026-09-04 21:03:58 -07:00
Matthew Meszaros
3596a9770f
feat: make mailboxes truly unlimited under a fair-use allowance of one mailbox per daily send the plan includes (15,000 on Business), drop the 200 hard cap and the 5-per-day connect throttle, open a request-more dialog with inline limit requests and plan upgrade when the allowance is reached, add bulk CSV mailbox import with live progress and a downloadable failed-rows file, reserve attachment storage atomically under a per-org lock so concurrent uploads cannot pass the quota ( #326 ), report storage and the allowance on the billing usage meters, and honor approved daily-send overrides in the sender
2026-09-04 21:00:26 -07:00
Matthew Meszaros
d80816efa1
feat: make a successful warmbly auth login always the active host instead of deciding it from three overlapping conditions, and say why the CLI state file tolerates an unwritable home
2026-09-04 20:16:56 -07:00
Matthew Meszaros
f68918d7f6
Merge remote-tracking branch 'origin/main' into feature/warmbly-cli
2026-09-04 20:14:46 -07:00
Matthew Meszaros
f46fc86a7c
feat: add the warmbly CLI at cmd/cli, a signed-in multi-host client of the public REST API with 30 command families over one spec table, gh-shaped api passthrough, live event tailing, tables on a terminal and JSON in a pipe, and a confirmation gate in front of everything that puts real mail on the wire
2026-09-04 20:14:33 -07:00
Matthew Meszaros
028689fd2e
feat: device-code sign-in for the CLI, with a browser approval page at /cli that mints a scoped API key, self-revocation at DELETE /api-keys/self so a read-only credential can always end itself, and app_url plus websocket_url on /auth/config so a client can find the dashboard and the realtime gateway on a self-hosted layout
2026-09-04 20:14:27 -07:00
Matthew Meszaros
5fd9aedb80
Merge remote-tracking branch 'origin/main' into feature/plan-upgrade-paywall-modal
2026-09-04 09:11:51 -07:00
Matthew Meszaros
e5360713e7
Merge remote-tracking branch 'origin/main' into feature/install-script-setup-wizard
2026-09-04 06:43:12 -07:00
Matthew Meszaros
d78e4423e4
fix: address the review of the notifications work — bound detached alert delivery to a fixed pool that drops and logs rather than spawning a goroutine per event, never echo a transport error that embeds the webhook URL, treat an emptied channel target as cleared so switching transport cannot post Slack payloads to a Discord URL, emit user.registered for invited signups and the worker alert after a successful reassignment, format Stripe amounts by currency exponent, refuse an upgrade while the plan list is still loading instead of silently opening the portal, apply a fixed discount to the annual invoice rather than to each month, convert proration from minor units, contain focus in the nested enterprise dialog, hide the odometer wheels from assistive tech, and drop the last dedicated-IP row from the pricing matrix
2026-09-04 06:33:20 -07:00
Matthew Meszaros
9a2184fda7
Merge remote-tracking branch 'origin/main' into fix/step-scoped-attachments
2026-09-04 06:28:26 -07:00
Matthew Meszaros
77058a2cb4
feat: address the review on the installer branch by keeping the database password out of pg_dump's argv, excluding backup bundles from the blob root they are written into, tolerating blobs that change or vanish mid-archive, making the instance-settings bootstrap a single atomic insert, and validating the release tag before it is written into .env
2026-09-04 06:24:05 -07:00
Matthew Meszaros
fb868dfe40
feat: delete the storage objects of a step's attachments when the step is deleted, since the attachment rows cascade away with the sequence and left their bytes counted against the organization's storage quota with no row left to reach them
2026-09-04 06:20:26 -07:00
Matthew Meszaros
a54774c0a5
feat: install the attachment upload's body cap before the first form field is read, since reading step_id parses the whole multipart body and left the MaxBytesReader that followed it with nothing to limit
2026-09-04 06:19:29 -07:00
Matthew Meszaros
85f3dad215
feat: send the files a step actually carries by honouring campaign_attachments.sequence_id in the send, test-send and preview paths instead of attaching every campaign file to every step, count them per step in the preflight content score, and refuse an upload naming another campaign's step
2026-09-04 06:16:16 -07:00
Matthew Meszaros
05e19ffb69
feat: scope the campaign attachment routes to the caller's organization, so listing, uploading to or deleting from a campaign id belonging to another workspace is a 404 instead of leaking presigned download URLs, adding a file that workspace then sends, or deleting their stored objects
2026-09-04 06:16:16 -07:00
Matthew Meszaros
81d6ba4520
Merge remote-tracking branch 'origin/main' into feature/plan-upgrade-paywall-modal
2026-09-04 06:09:14 -07:00
Matthew Meszaros
a0c9d5a5b0
feat: add operator notification channels an admin configures in the panel (Discord, Slack, HMAC-signed webhook, or email) with per-channel event subscriptions, a synchronous test probe, SSRF-guarded URLs and credentials redacted on read, wire nine instance events including the enterprise inquiry that previously wrote a row nobody was told about, and reword the plan-specific limits copy so it reads correctly without billing
2026-09-04 06:02:40 -07:00
Matthew Meszaros
d68bbcd2ab
feat: add a one-command self-host installer at warmbly.com/install.sh with an interactive data-control wizard, give docker-compose.yml image keys and per-store volume variables, add an image-mode updater, move engagement/form/audit retention into instance settings, and add warmblyctl backup/restore
2026-09-04 05:49:54 -07:00
Skylinerffm97
1749d5c48e
feat: persist schedule_windows on POST /campaigns by adding the field to models.CreateCampaign, validating it with CampaignScheduleWindows before the transaction and writing it in the create INSERT, with a unit test for rejected windows, a live repository test for the round trip and the create field table in the campaigns API reference (issue #307 item 5)
2026-09-04 12:58:09 +02:00
Matthew Meszaros
483d6c2fe7
Merge remote-tracking branch 'origin/main' into fix/issue-307-test-send-preview-from-name
2026-09-04 03:34:35 -07:00
Matthew Meszaros
915390f42a
feat: match the closing body tag case-insensitively when placing the mailbox signature so a pasted document written with </BODY> still gets it inside the body, drop a step preview response whose request has been superseded so an out-of-order reply cannot repaint stale copy, and keep pulling mailbox pages in the preview sender picker while an enabled campaign sender is still unaccounted for
2026-09-04 03:11:53 -07:00
Matthew Meszaros
64e6e3a502
Merge remote-tracking branch 'origin/main' into fix/campaign-daily-budget-deferrals
2026-09-04 03:06:45 -07:00
Matthew Meszaros
de33b03891
feat: give the HTML mailbox signature its own block with a top margin instead of a hard double line break that stacked against the body's trailing margin and rendered as two to three blank lines in Apple Mail and Outlook, insert it inside the document when the body carries a closing body tag as the tracking pixel and opt-out footer already do, and say so in the mailboxes guide
2026-09-04 03:01:19 -07:00