Skip to content

fix(platform): preserve recurring task work and series - #3771

Merged
yannickmonney merged 10 commits into
mainfrom
fix/recurring-task-review-corrections
Sep 28, 2026
Merged

yannickmonney merged 10 commits into
mainfrom
fix/recurring-task-review-corrections

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Recurring series could exceed their ten-open-task limit or leave rules behind after a middle task was deleted, truncate wide/deep subtasks, and reclaim copies whose dependencies a person had edited. Closing from a workflow could also repeat stale task content after a concurrent edit. The controls could carry a completed Stop result into another task, mishandle a typed interval, or hang on unsupported calendar dates.

This correction preserves complete task trees and edited dependencies, persists deletion-safe series identity, retries workflow status conflicts, bounds calendar arithmetic, and keeps Stop/preview/stepper state consistent. Calendar recovery messages and task/API guidance cover EN/DE/FR and the applicable Swiss German override.

Migration 0130_task_repeat.sql is unchanged. New 0132_task_repeat_series.sql upgrades its existing data after OAuth's 0131: it recovers membership from live pointers and retained creation-audit ancestry, rejects malformed/foreign ancestry, and assigns membership when the previous image publishes a copy during a rolling deployment. Normal chains are traversed once; malformed cycles terminate separately. Deleted links whose audit ancestry was also erased cannot be reconstructed and are kept as separate components.

Validation:

  • All original correction regressions were observed red before their fixes: calendar hangs/range failures, truncated trees/series, deletion-gap caps, edited dependencies, and workflow edit races.
  • Fresh PostgreSQL:134/134 across recurrence, tasks, external issue sync, OAuth/credentials and the upgrade lane; after improving traversal and adding old/new-writer cases,62/62 across recurrence and upgrade. The upgrade lane recreates the shipped schema inside a rolled-back transaction and checks retained/deleted ancestry, missing history, malformed/conflicting/cyclic provenance, tenant/project boundaries,1,001 predecessors, idempotency, Stop/cap behavior and rollback.
  • Current tree:175 related server tests,87 platform UI tests,119 shared control tests,171 docs tests; platform types, scoped lint and manual inventory/guide checks.
  • The unchanged corrected runtime also passed the prior frozen composition's54 fresh lint/type/server tasks and4,210 platform UI tests. A fresh24-case Chromium rebuild on this tree and the prior component observations covered repeat selection, pointer/keyboard stepper edits, exhausted dates, Stop navigation/focus and task limits in localized phone/desktop layouts; transport was synthetic, so these are component/browser observations rather than live-vendor or screen-reader audio proof.

Depends on #3729 for migration0131. Full current-head CI remains required before merge. React Doctor reports83/100: its single error is the existing OAuth error_page.ts filename, with warnings for deliberate transaction/fixture sequencing and control complexity; no rule was disabled.

yannickmonney and others added 10 commits September 28, 2026 14:58
Every completed consent for a connector without a workspace id (Gmail,
Outlook, Google Drive, Teams) renewed the connector's default grant: a
second account added through Add credential silently replaced the first,
and Reconnect on any other row rewrote the default instead (#3711).

The pending authorization now carries the intent. Migration 0130 adds
app.connector_oauth_states.reconnect_credential_id (NULL = Add, no
foreign key); the start door takes an optional credentialId and keeps it
only when it names an OAuth grant of that organization and connector.
The callback reads the intent from the consumed row alone, re-checks the
initiator's membership and developer role, and refuses a Reconnect whose
credential is gone before redeeming the code.

storeOauth2Grant runs as one transaction under a per-(organization,
connector) advisory lock, row-locks the Reconnect target before reading
the siblings, and lets a pure planner decide: Add stores a new credential
under a free name, Reconnect renews exactly its credential (needs-reauth
cleared, disabled kept) or saves nothing, Slack keeps one credential per
workspace and refuses a Reconnect into another. Every credential create
takes the same pair lock, so concurrent first adds no longer die on the
name or default index. New fixed pages: credential_missing,
account_mismatch, forbidden.

The native-Postgres lane checkConnectorOauthIntent proves each case;
the claim-race probe's initiator is now a member of its organization.
Connect and Reconnect sent the browser to the same start URL, so nothing
told the callback which credential a consent was for (#3711).
goToAuthorization now takes an explicit intent: Add credential > Connect
starts an Add that names no credential, and a row's Reconnect names that
row's id. The parameter name is shared with the start door
(lib/shared/connector-consent.ts), so the page and the door cannot drift
into a Reconnect that silently lands as an Add.
The connector guides promised that Add credential connects another
account and that Reconnect keeps the credential's name and references,
while the product renewed the default grant for both (#3711). EN, DE and
FR now say what each does: every Connect adds a new credential (named
after the connector and numbered, renamed through Edit credential),
Slack keeps one credential per workspace, Reconnect renews exactly the
row it was chosen on and leaves a disabled credential disabled, and a
removed credential, a lost role or another Slack workspace saves nothing.

The connectors manual suite asserts the rows by their masked previews,
explains how to run the consent boxes against a loopback fake vendor,
and gains CONN-F19/F20 and CONN-B7-B10; the automation, pins and
error-code registers name the new coverage and pages.
@yannickmonney
yannickmonney merged commit 2023dbf into main Sep 28, 2026
57 checks passed
@yannickmonney
yannickmonney deleted the fix/recurring-task-review-corrections branch September 28, 2026 23:01
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.

1 participant