Repository navigation
fix(trackers): remove dead ends on the Trackers page and trigger form - #392
Merged
Merged
Conversation
Attaching a tracker its connection no longer covered raised RecordInvalid unrescued (500); it now redirects with the reason and points to the Integrations page. A trigger keeps the tracker it names through a detach: it stays switched on but does not fire (a detached tracker publishes no events), it stays editable, and the form and Triggers tab say so. Before, saving it was refused unless it was widened to "any tracker". The tracker trigger form defaults to a project-level run without a board, keeps filter conditions set through the API or MCP and lists them, and says when a mention cannot fire. The intake drawer picks the column from the board's real columns (free text only when they cannot be read), greys out the mention entry with the reason, and a workflow can no longer hold two identical tracker triggers. The handle can be edited from the Trackers page. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
artempartos
added a commit
that referenced
this pull request
Oct 1, 2026
…setting Keeps the switch, and its field in the form value, clear of the lines the trackers UI work (#392) edits, so the two merge without conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
artempartos
added a commit
that referenced
this pull request
Oct 1, 2026
…ks, failure-comment switch (#393) * fix(trackers): attribute events that overtake the write that caused them The event pipeline matches a tracker event to the write that caused it by issue id, but with_write stored the issue id only after the provider call returned. A webhook processed while the call was still in flight matched nothing: under "Only from other workflows" it carried no chain and could restart the same workflow, and on a Jira connection that acts as a person it passed for that person's change. Updates, transitions, assignments and comments now record the issue before the call, as the caller named it (Provider#issue_identifier: the id, or on Jira possibly the key), and the pipeline matches either. A create learns its issue only from the answer, so an issue-created event that arrives while a create on the same project is pending is retried by the delivery job (12 runs, 5 s apart) and published as it stands on the last one. RunStatusReporter resent a refused failure comment while its ledger row was still `failed`, which the pipeline never matches; it is pending again before the resend, as in with_write. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]> * fix(azure-devops): check and repair work item Service Hooks on Test connection Test connection re-provisioned only the CI hooks, so the workitem.* hooks Boards triggers depend on were never retried, and every failure was only logged: the connection reported itself verified while no event could arrive. It now asks Azure for the state of every hook first (refresh_status!, which had no caller), recreates the missing, refused or deleted ones, including the workitem.* hooks once a tracker trigger waits for this connection's trackers, and reports the outcome in the flash: green when every hook is in place, red with each hook that is not delivering and why. Connecting provisions the workitem.* hooks too when a trigger for any tracker already exists. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]> * feat(trackers): failure-comment switch on the tracker trigger form The comment Flow posts on an issue when a tracker-started run fails or is cancelled is governed by notify_on_failure (on by default), which only the API could turn off. The tracker trigger form now has the switch, and the MCP trigger tools and the model no longer describe the setting as Slack-only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]> * docs(trackers): attribution of in-flight writes, hook repair, failure switch Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]> * refactor(trackers): place the failure switch after the Aixle-changes setting Keeps the switch, and its field in the form value, clear of the lines the trackers UI work (#392) edits, so the two merge without conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]> --------- Signed-off-by: Artem Petrov <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Removes the dead ends on the project Trackers page, the Connect a board column drawer and the tracker trigger form (integration docs review, design §6.8 / §8.3).
What was wrong, and what changed
"Attach again" could 500.
TrackersController#updatecalledProjectTracker#reattach!unrescued (app/controllers/web/company/projects/trackers_controller.rb:40). A detached tracker skipsscope_covered_by_integration, so on a tracker the Jira connection no longer covers,reattach!raisedRecordInvalid. It now redirects back with "connection no longer covers tracker. Add it to the connection on the Integrations page, then attach it again.", and the page shows the server's reason instead of "Failed to update tracker". Model errors are also passed as full messages ("Handle has already been taken").Detached trackers kept enabled triggers you could not edit. Behaviour chosen: the trigger keeps its tracker. It stays switched on but does not fire (a detached tracker publishes no events:
ProjectTracker.usableinTrackers::EventPipeline), fires again after "Attach again" (already what the user guide promised), and stays editable.TriggerBinding#project_tracker_in_project(app/models/trigger_binding.rb:129) now refuses a detached tracker only when a binding is created on it or moved to it, so editing no longer forces the silent widening to "Any tracker". The builder now receives detached trackers with theirstatus; the form lists the bound one as "Name (handle) — detached" and says the trigger does not fire until the tracker is attached again; the Triggers tab shows "handle (detached, not firing)"; the Detach confirmation says the triggers stop firing. The tracker kind is still offered only when an attached tracker exists.Boardless projects could not save a tracker trigger with the defaults.
trackerValueFromTrigger(trackerTrigger.ts:61) always defaulted tofind_or_create_task, which needs a Task column. With no board the default is now None — project-level run, and the subjects that create a task are greyed out with a hint.The intake column had to match exactly but was free text.
ConnectColumnDrawerused anAutocomplete: suggestions fromuseTrackerStatuses, any text accepted, matched case-sensitively byTriggerFilter(in→ exactinclude?). The column is now aSelectof the board's real columns. Only when they cannot be read (or the board has none) does it fall back to typing, with a warning that the name is not checked.useTrackerStatusesnow reports loading and failure.Connecting the same column twice made two triggers that both fired. New
TriggerBindingvalidation: a workflow cannot hold two tracker bindings with the same event type, tracker andfilter_predicate(compared as jsonb). The drawer shows the refusal. The rule applies to the API and MCP as well, because every binding that matches starts its own run. It only checks when a binding is created or its tracker or filter changes, so existing duplicates can still be edited and switched off."Aixle is mentioned in a comment" was offered where it could not fire. New
ProjectTracker#recognizes_mentions?(tracker_provider.identity.present?, the same identitymentions_self?uses), exposed asmentionsRecognizedonProjectTrackerResourceand on the builder's tracker list. The drawer greys out the mention entry and gives the per-provider reason: Azure needs a first work-item write; Jira needs a service account or "This Atlassian account is kept for Aixle". The trigger form shows the same reason under "Only when Aixle is mentioned".Saving from the form dropped filter conditions set through the API or MCP.
trackerTriggerPayloadrebuiltfilter_predicatefrom the form's fields only. Conditions the form cannot show exactly are now kept inotherConditions, listed read-only under "Other conditions", and merged back on save.No handle edit, and "Add tracker" almost never appears. Added Edit handle (pencil on each row → drawer →
PATCH { handle }).updatealready accepted it. "Add tracker" stays.Trackers::Provisioningcreates a tracker for every scope the connection covers, so the button appears only when provisioning skipped a scope. That makes it the recovery path, and it is also the design's path for connections that serve more than their own project. To stop it being a dead end, the page now says where trackers come from and links to Integrations when there is nothing to add.User guide
docs/user-guide/trackers.mdand its bundled copy are updated (identical). The design doc's §6.4 validation, §6.8 setup and §8.3 step 6 now describe the chosen behaviour.Tests
Run locally, targeted:
bin/rails test:project_tracker_test,trigger_binding_tracker_test,trigger_binding_test,trackers_controller_test,trackers_authorization_test,workflows_controller_test, APItriggers_controller_test, plus neighboursevent_pipeline_test,process_delivery_job_test, templatesexporter_test/installer_test,workflow_triggers/creator_test,personal_mcp_triggers_test,jira/integration_service_test,run_status_reporter_test,jira/personal_data_test,resolve_azure_devops_event_job_test,jira_integrations_test,documentation_drift_test,docs_render_test. All green.shared/resources/trackers/*,TriggerFormPanel,TriggersTab,BuilderPage,pages/Projects/Trackers,pages/Docs. Plusyarn tsc,yarn lint(no new warnings),yarn fsd.New tests: a refused attach says why; a taken handle gets a readable error; a binding keeps a detached tracker but cannot be moved onto one; duplicate tracker bindings are refused (a different filter, any tracker or another workflow are not duplicates); mention recognition per provider; the builder lists detached trackers with
mentionsRecognized. On the frontend: column picker and typed fallback, greyed-out mention option, handle edit, attach error, Integrations pointer, conditions kept on save, boardless default, detached tracker in the form and the Triggers tab.The full suite runs on CI; it is the full verification for this PR.
Not changed
ProjectTracker#reattach!itself is unchanged. The readable refusal lives in the controller, its only caller.🤖 Generated with Claude Code