Repository navigation
fix(platform): preserve recurring task work and series - #3771
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.sqlis unchanged. New0132_task_repeat_series.sqlupgrades its existing data after OAuth's0131: 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:
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.tsfilename, with warnings for deliberate transaction/fixture sequencing and control complexity; no rule was disabled.