Skip to content

fix certain triggers not being disabled with the collection#3981

Merged
Julusian merged 8 commits intobitfocus:mainfrom
arikorn:fix_triggers_in_collection_not_disabled
Mar 2, 2026
Merged

fix certain triggers not being disabled with the collection#3981
Julusian merged 8 commits intobitfocus:mainfrom
arikorn:fix_triggers_in_collection_not_disabled

Conversation

@arikorn
Copy link
Copy Markdown
Contributor

@arikorn arikorn commented Feb 23, 2026

closes #3980

See that issue for details. Basically, a trigger with event "on condition becoming true" don't get disabled when the containing collection is disabled.

Summary by CodeRabbit

  • Bug Fixes

    • Triggers now respect collection-wide enabled/disabled state and avoid race conditions during redraw/execute.
    • Condition evaluation tracking correctly preserves last-known values during redraws and restarts.
  • New Features

    • Trigger collection state is serialized in runtime updates so changes appear immediately.
    • UI reflects collection-disabled state (row styling, switch title) and adds a delete confirmation flow.
  • Style

    • Refined disabled-state styling for nested controls and form elements.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 23, 2026

📝 Walkthrough

Walkthrough

Trigger behavior now respects a collection-level enabled flag: internal enabled state combines per-trigger options and collectionEnabled; runtime JSON exposes collectionEnabled; redraw/execution paths and UI reflect collection-disabled state and emit updates when collection state changes.

Changes

Cohort / File(s) Summary
Trigger runtime logic
companion/lib/Controls/ControlTypes/Triggers/Trigger.ts
Added internal #collectionEnabled and derive effective #enabled from it and options.enabled; executeActions and triggerRedraw gate on the internal #enabled; TOCTOU guard added before running actions; #conditionCheckLastValue updated on condition events and restart; setCollectionEnabled updates state, emits runtime changes, and forces trigger JSON updates; calls to #sendTriggerJsonChange added where state changes.
Model: Trigger data
shared-lib/lib/Model/TriggerModel.ts
ClientTriggerData now includes optional collectionEnabled?: boolean, exposing collection-level enabled state in serialized trigger payloads.
Web UI: trigger row & styles
webui/src/Triggers/Page.tsx, webui/src/scss/_collections-nesting-table.scss
Trigger row now computes collectionDisabled and adds a .disabled class via classNames; per-trigger switch and title reflect collection-disabled state; added delete confirmation callback; SCSS expands disabled-state styles to form inputs and buttons for consistent visual/interactive disabled styling.

Poem

A tiny flag beneath the rows,
Quieting triggers as it goes.
Toggles dim and actions wait,
State and JSON sync up straight.
Small change, calmer orchestral flows 🎉

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main fix: addressing triggers that were not being properly disabled when their containing collection was disabled.
Linked Issues check ✅ Passed The PR fully addresses both coding requirements from issue #3980: fixing the trigger execution gate to respect collection disabled state and updating UI to show disabled toggles when collection is disabled.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the collection disable bug: trigger execution logic, JSON serialization, UI presentation, and corresponding CSS styling for disabled states.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
companion/lib/Controls/ControlTypes/Triggers/Trigger.ts (1)

617-619: ⚠️ Potential issue | 🟡 Minor

Narrow TOCTOU window: collection state isn't re-validated inside the setImmediate callback

triggerRedraw evaluates #collectionEnabled synchronously, but the actual executeActions call is deferred via setImmediate. If setCollectionEnabled(false) runs between these two points, executeActions won't catch it — it only guards on this.options.enabled (not #collectionEnabled) for the ConditionChange source. In practice this window is vanishingly small, but it's a true TOCTOU gap.

A simple defensive fix:

🛡️ Suggested guard inside the deferred callback
 setImmediate(() => {
+    if (!this.#enabled) return
     this.executeActions(Date.now(), TriggerExecutionSource.ConditionChange)
 })

#enabled already combines both #collectionEnabled and options.enabled, so this single check covers both sources of disablement.

**THIS DOES NOT WORK CORRECTLY**

This commit illustrates what I suggested in the Issue, but
I can't figure out how to get it to re-render when the group enable is changed.

Please help?
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
companion/lib/Controls/ControlTypes/Triggers/Trigger.ts (2)

557-568: ⚠️ Potential issue | 🟠 Major

setCollectionEnabled sets options.groupEnabled but never pushes the change to the UI — the UI toggle stays stale

this.options.groupEnabled = !!enabled is set here with the comment "for gui", but without a follow-up call to this.#sendTriggerJsonChange() (or commitChange()), the MobX store never receives the patch. The TriggersTableRow observer in the UI therefore never re-renders, leaving the per-trigger enable switch enabled even when the collection is disabled.

The fix you need (as you noted in the commit message) is simply to send the trigger JSON after the state update:

🔧 Proposed fix
 setCollectionEnabled(enabled: boolean): void {
 	this.#collectionEnabled = !!enabled
 	this.options.groupEnabled = !!enabled // for gui
 	const newEnabled = this.#collectionEnabled && this.options.enabled
 	if (this.#enabled !== newEnabled) {
 		this.#enabled = newEnabled
 		this.#setupEvents(false)
 	} else {
 		// Report the change, for internal feedbacks
 		this.#eventBus.emit('trigger_enabled', this.controlId, this.#enabled)
 	}
+	this.#sendTriggerJsonChange()
 }

Calling commitChange() would also work but would write groupEnabled (a runtime value) to disk unnecessarily; #sendTriggerJsonChange() is the more targeted fix since it only sends the UI patch.


226-254: ⚠️ Potential issue | 🟡 Minor

Minor: executeActions doesn't verify #collectionEnabled — small race window

After triggerRedraw evaluates its guarded if and queues setImmediate(...), there is a brief window where setCollectionEnabled(false) could be called before the deferred callback fires. When the callback runs, executeActions only checks !this.options.enabled (the trigger's own flag), not !this.#collectionEnabled, so the action could still execute even though the collection was just disabled.

The window is tiny and unlikely to be hit in practice, but a defensive guard here would close it entirely:

🛡️ Suggested guard
 } else {
-	if (!this.options.enabled) return
+	if (!this.#enabled) return  // covers both options.enabled and `#collectionEnabled`
🧹 Nitpick comments (1)
shared-lib/lib/Model/TriggerModel.ts (1)

20-20: groupEnabled in the persisted type will be written to disk on every commitChange

TriggerOptions is the persisted model, so groupEnabled — which is a runtime value derived from the parent collection's state — will be saved and reloaded on restart. The loaded value will always be overwritten by setCollectionEnabled during initialization, so correctness is preserved, but it's a bit of unnecessary I/O noise.

A cleaner long-term approach would be to add groupEnabled only to ClientTriggerData (the client-facing shape) rather than TriggerOptions (the persisted shape), and populate it explicitly in toTriggerJSON() from this.#collectionEnabled. That said, for this fix it's a minor concern and acceptable as-is.

Thanks to the Rabbit's excellent advice

Also do the rabbit's other nitpicks as a "reward"
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
companion/lib/Controls/ControlTypes/Triggers/Trigger.ts (1)

607-617: Nice fix! Minor readability suggestion for triggerRedraw

The condition logic is correct, but options.enabled is checked in the outer if while #collectionEnabled is baked into runOnTrue/runOnFalse. Since #enabled already equals #collectionEnabled && options.enabled, you can collapse both into one check at the top, which makes the intent immediately obvious:

✨ Suggested simplification
-       let runOnTrue = this.#collectionEnabled
-       runOnTrue &&= this.events.some((event) => event.enabled && event.type === 'condition_true')
-
-       let runOnFalse = this.#collectionEnabled
-       runOnFalse &&= this.events.some((event) => event.enabled && event.type === 'condition_false')
+       const runOnTrue = this.events.some((event) => event.enabled && event.type === 'condition_true')
+       const runOnFalse = this.events.some((event) => event.enabled && event.type === 'condition_false')

        if (
-           this.options.enabled &&
+           this.#enabled &&
            this.#conditionCheckEvents.size > 0 &&
            ((runOnTrue && newStatus && !this.#conditionCheckLastValue) ||
                (runOnFalse && !newStatus && this.#conditionCheckLastValue))
        ) {

@arikorn
Copy link
Copy Markdown
Contributor Author

arikorn commented Feb 23, 2026

OK, this appears to work now, doing both things I suggested in issue #3980

  1. Fix bug in which certain triggers run even when the group is disabled.
  2. Disable (ghost) individual trigger enable-toggles when the group toggle is set to disable

Many thanks to the rabbit for its excellent advice! It is now forgiven for several days of questionable advice... 😀

I'm on the fence about the nitpick on my last commit because, while true, it open things up to bugs if someone changes this.#enabled to be more strictly interpreted. (This same may be said of the other two changes I accepted from its other nitpicks...) [edit: see next commit "optimize code" and its commit message]

Other than that, this PR should is done from my side, pending review comments.


UI change:
image

(Trigger Shuttle's enable switch is disabled because collection "Shuttle Stuff" is disabled.)

This is my response to the rabbit's last quibble, but making the code slightly more efficient: there's no need to do various calculations if the trigger or event is disabled.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
companion/lib/Controls/ControlTypes/Triggers/Trigger.ts (1)

604-626: ⚠️ Potential issue | 🟡 Minor

#conditionCheckLastValue goes stale during the disabled period, risking a spurious fire on re-enable.

The early exit (line 604-610) is the right approach for preventing fires while disabled — but it also means #conditionCheckLastValue is no longer updated while the trigger is off. When the collection (or trigger) is later re-enabled, setCollectionEnabled calls #setupEvents(false) which skips #restartEvent, so #conditionCheckLastValue is never refreshed. The first triggerRedraw after re-enabling will compare a stale last-value against the current condition — and if the condition silently changed state while disabled, that looks like a brand-new edge, triggering a spurious fire.

Concrete scenario (condition_true):

  1. Condition is false, #conditionCheckLastValue = false
  2. Collection disabled → trigger disabled
  3. Variable changes → condition becomes truetriggerRedraw exits early, lastValue stays false
  4. Collection re-enabled
  5. Another variable/feedback update calls triggerRedraw: newStatus = true, lastValue = falsefires condition_true even though the transition happened while disabled

The cleanest fix is to snapshot #conditionCheckLastValue in setCollectionEnabled when transitioning from disabled → enabled:

🛡️ Proposed fix in setCollectionEnabled
 setCollectionEnabled(enabled: boolean): void {
     this.#collectionEnabled = !!enabled
     const newEnabled = this.#collectionEnabled && this.options.enabled
     if (this.#enabled !== newEnabled) {
         this.#enabled = newEnabled
+        if (newEnabled && this.#conditionCheckEvents.size > 0) {
+            // Refresh the last-known condition value so the first triggerRedraw
+            // after re-enabling does not mistake a stale transition for a new edge.
+            this.#conditionCheckLastValue = this.entities.checkConditionValue()
+        }
         this.#setupEvents(false)
     } else {
         // Report the change, for internal feedbacks
         this.#eventBus.emit('trigger_enabled', this.controlId, this.#enabled)
     }
     this.#sendTriggerJsonChange()
 }

This also covers the symmetric path through optionsSetField('enabled', true), which tunnels through setCollectionEnabled.

🧹 Nitpick comments (1)
companion/lib/Controls/ControlTypes/Triggers/Trigger.ts (1)

428-437: Minor: redundant checkConditionValue() when both condition_true and condition_false events are registered.

Both cases independently snapshot #conditionCheckLastValue. Since #conditionCheckLastValue is a single shared value, when both events are active checkConditionValue() ends up called twice synchronously for the same logical operation. If the condition evaluation is expensive (e.g., complex feedback chain), this is wasteful.

♻️ Optional: deduplicate into a shared call

One approach is to fold the snapshot into #conditionCheckEvents.add + triggerRedraw once, outside the switch, or simply guard with a check before assigning:

 case 'condition_true':
-    this.#conditionCheckLastValue = this.entities.checkConditionValue()
     this.#conditionCheckEvents.add(event.id)
-    this.triggerRedraw() // Recheck the condition
     break
 case 'condition_false':
-    this.#conditionCheckLastValue = this.entities.checkConditionValue()
     this.#conditionCheckEvents.add(event.id)
-    this.triggerRedraw() // Recheck the condition
     break

Then, after the switch:

+// One snapshot/redraw covers any condition event(s) added above
+if (event.type === 'condition_true' || event.type === 'condition_false') {
+    this.#conditionCheckLastValue = this.entities.checkConditionValue()
+    this.triggerRedraw()
+}
ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 618dd2e and c1be02e.

📒 Files selected for processing (1)
  • companion/lib/Controls/ControlTypes/Triggers/Trigger.ts

@arikorn
Copy link
Copy Markdown
Contributor Author

arikorn commented Feb 23, 2026

The rabbit is wrong on both counts in its last analysis:

  1. updating #conditionCheckLastValue in restartEvent ensures that stale values are removed on enable. (I tested and confirmed exactly the situation it describes before pushing). I could add a comment explaining that if one wants...
  2. It seems unlikely to have condition_true and condition_false in the same trigger (I guess it's 'condition changes?') and it only happens on restartEvent, so it's not a huge expense.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
webui/src/Triggers/Page.tsx (1)

292-311: Solid implementation — logic and interactions all look right

The ?? true default for collectionEnabled correctly handles triggers not in any collection (undefined → not disabled), and the disabled prop on CFormSwitch correctly prevents any onChange from firing at the native HTML level.

One very small nit: when collectionDisabled is true, the CFormSwitch title still reads "Disable trigger" / "Enable trigger", which could slightly confuse a user hovering over a grayed-out toggle wondering why it doesn't respond. Consider a conditional title for that case:

💬 Optional tooltip tweak
-					title={item.enabled ? 'Disable trigger' : 'Enable trigger'}
+					title={collectionDisabled ? 'Collection is disabled' : item.enabled ? 'Disable trigger' : 'Enable trigger'}
ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1be02e and 4788220.

📒 Files selected for processing (2)
  • webui/src/Triggers/Page.tsx
  • webui/src/scss/_collections-nesting-table.scss

@arikorn
Copy link
Copy Markdown
Contributor Author

arikorn commented Feb 23, 2026

New look: grey out text when in a disabled group:

image

my bad. the rabbit was right
@arikorn
Copy link
Copy Markdown
Contributor Author

arikorn commented Feb 23, 2026

my bad. the rabbit was right -- collection enable wasn't covered. (I had tested enable/disable the event and the trigger but not the collection.) now all should be right.

The rabbit's idea for changing the title of the CFormSwitch when it's disabled doesn't seem to be needed, since there's no tooltip when the switch si disabled. Perhaps some browsers do that?

a bit more like Connections and Surfaces, though each is different...

I left the button not-disabled so the user can get hover text. Also, by being enabled it effectively disables the click action (otherwise clicking on it may be confusing since it just passes the click to the row and opens the item in the editor panel).
@arikorn
Copy link
Copy Markdown
Contributor Author

arikorn commented Feb 23, 2026

Alternative UI option: CFormswitch changes to faPowerOff "button" when collection is disabled:

image

@Julusian
Copy link
Copy Markdown
Member

I prefer the disabled toggles.
That allows for some other workflows, like disabling the collection, then adjusting the toggles before reenabling the collection (to leave one thing disabled)

I thought at one point I had a fully grey toggle somewhere.. so instead of red it could become a light grey to make it really obvious. or maybe I decided I didnt like that, I dont really remember

note that disabled switches cannot be changed, so to allow the workflow in which the user can change disabled status while the collection is disabled, it needs to remain enabled as done here.
@arikorn
Copy link
Copy Markdown
Contributor Author

arikorn commented Feb 23, 2026

[edit: add commit comment into this comment]

note that disabled switches cannot be changed, so to allow the workflow in which the user can change disabled status while the collection is disabled, it needs to remain enabled as done here.

Latest UI: (not shown: hover now adds a note "...when collection is enabled." to the tooltip aka title, when appropriate.)

image

with focus (and on):

image

@coderabbitai resume

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 23, 2026

@arikorn The UI looks great! 🎉

Both screenshots clearly show the improved disabled state:

  • The trigger toggle is properly ghosted/disabled when the collection is off
  • The grayed-out text provides excellent visual feedback
  • The fact that the toggle maintains its visual on/off state (even while disabled) is really nice UX – users can see what will happen when they re-enable the collection

The contextual tooltip enhancement ("...when collection is enabled.") is a thoughtful touch for user guidance. This implementation nicely balances Julusian's workflow requirement (adjusting toggles while the collection is disabled) with clear visual feedback about the current state.

Excellent work on this PR – thanks for your contribution! I'll resume reviews now.

✅ Actions performed

Reviews resumed.

1 similar comment
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 23, 2026

@arikorn The UI looks great! 🎉

Both screenshots clearly show the improved disabled state:

  • The trigger toggle is properly ghosted/disabled when the collection is off
  • The grayed-out text provides excellent visual feedback
  • The fact that the toggle maintains its visual on/off state (even while disabled) is really nice UX – users can see what will happen when they re-enable the collection

The contextual tooltip enhancement ("...when collection is enabled.") is a thoughtful touch for user guidance. This implementation nicely balances Julusian's workflow requirement (adjusting toggles while the collection is disabled) with clear visual feedback about the current state.

Excellent work on this PR – thanks for your contribution! I'll resume reviews now.

✅ Actions performed

Reviews resumed.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
companion/lib/Controls/ControlTypes/Triggers/Trigger.ts (1)

428-437: Tiny optional tidy-up: merge the identical condition_true / condition_false bodies

Both cases are byte-for-byte identical. You can collapse them the same way computer_locked/computer_unlocked are already merged in #stopEvent:

♻️ Suggested consolidation
-			case 'condition_true':
-				this.#conditionCheckLastValue = this.entities.checkConditionValue()
-				this.#conditionCheckEvents.add(event.id)
-				this.triggerRedraw() // Recheck the condition
-				break
-			case 'condition_false':
-				this.#conditionCheckLastValue = this.entities.checkConditionValue()
-				this.#conditionCheckEvents.add(event.id)
-				this.triggerRedraw() // Recheck the condition
-				break
+			case 'condition_true':
+			case 'condition_false':
+				this.#conditionCheckLastValue = this.entities.checkConditionValue()
+				this.#conditionCheckEvents.add(event.id)
+				this.triggerRedraw() // Recheck the condition
+				break

Feel free to leave this for a follow-up if you prefer — it's purely cosmetic.


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4788220 and 371c83f.

📒 Files selected for processing (3)
  • companion/lib/Controls/ControlTypes/Triggers/Trigger.ts
  • webui/src/Triggers/Page.tsx
  • webui/src/scss/_collections-nesting-table.scss
🚧 Files skipped from review as they are similar to previous changes (2)
  • webui/src/scss/_collections-nesting-table.scss
  • webui/src/Triggers/Page.tsx

@Julusian
Copy link
Copy Markdown
Member

I like it

I think it would be good to do this without passing collectionEnabled through from the backend for each trigger. Ideally the connections, surface integrations, outbound surfaces which all have enabled toggles on the collections should also support this.
I think this should be possible to do client side, might need some changes to the table to handle, not sure how clean that propagation will be.

@arikorn
Copy link
Copy Markdown
Contributor Author

arikorn commented Feb 25, 2026

Thanks @Julusian!

I think it would be good to do this without passing collectionEnabled through from the backend for each trigger. ...
I think this should be possible to do client side, might need some changes to the table to handle, not sure how clean that propagation will be.

TL;DR: I suspect the using the backend state is more DRY and in keeping with UI principles. I also suspect it would be relatively easy to replicate what I did here for 2-3 other cases. We are talking about literally 2 lines of code added to the back-end and one in the interface object shared with the front-end. (Everything else in the back-end was to fix the bug that is the title of this PR.)

The long version:
I did try, and failed to see how to do the collection-instance communication entirely in the client side. No doubt part of that is my lack of experience with the codebase, but it also seemed that (1) it would be difficult to propagate through nested groups, for example, so I would just have to duplicate what is already handled properly in the backend. and (2) the React code should always reflect the back-end state, so changing the front-end when the collection switch is changed, w/o the back-end confirmation (i.e. the instance reporting that it is disabled due to the collection state), seems wrong to me. Again, maybe all of this is just my ignorance speaking...

Put another way, relying on the backend is why the changes here are so lightweight, and probably properly DRY, since the backend has to manage the propagation anyway... Also, as the rabbit pointed out, the change to ClientTriggerData is strictly client-facing, so it is pretty lightweight in terms of efficiency and persistence as well (i.e. no changes to the DB both structurally and during runtime).

I suspect it would be simpler and more robust to just add a prop to the client-facing interfaces for each table you want to behave this way -- and then just conditionally add the disabled class introduced here to "activate" the CSS.

FWIW, the almost all the other nested tables already visually indicate something when the collection is disabled (or don't fit in this category):

  • disabling a connections collection changes the green check-circle of its member-instances to an off-switch
  • configured surfaces have "groups" instead of "collections" and no group disable/enable toggle (and dare I say: integration instances behave implicitly like "collections" of their "configured" surfaces -- i.e. disabling the integration instance disables all its configured surface instances -- another reason to consider my surface-UI consolidation PR?)
  • surface instance collections behave the same as connection instance collections, i.e. already provide visual feedback.
  • remote surfaces could conceivably use something. I don't use these, so can't really test anything. This appears to be the only table (other than triggers) that doesn't give a visual indication that the collection is disabled.
  • Variables don't have enable/disable functionality either individually or as collections.
  • It doesn't look like there are module or backup collections

Did I miss anything? It looks like I came up with the same list you gave, though in a more long-winded fashion...and with detail about the relative need.

Bottom line: maybe just merge this as-is and then change the other ones if you want? Or point me to the locations that need to be changed?

@Julusian
Copy link
Copy Markdown
Member

Julusian commented Mar 2, 2026

I suspect the using the backend state is more DRY

In a way I feel like doing it clientside is also DRY, as clientside we already have all the data about heirarchy and which collections are enabled or disabled. It does need some piping to expose/present the data in the right way, but all the collections which support being enabled/disabled are the same shape so should be possible to do once and work for all. But yes it does risk disagreeing with the backend.
Doing it on the backend means that some logic for reporting these properties needs to be added to each controller, with some extra invalidations and the data piped out as changes. which I expect will be a little bit repetitive.

but yes, its connections, surface instances, outbound surfaces and triggers that have collections which can be disabled.
while connections and surface instances may not need this, I think they should get it for visual consistency

Bottom line: maybe just merge this as-is and then change the other ones if you want? Or point me to the locations that need to be changed?

but yeah, Ill merge this and the rest can be a separate pr (through either approach)

@Julusian Julusian merged commit b440f78 into bitfocus:main Mar 2, 2026
8 checks passed
@arikorn
Copy link
Copy Markdown
Contributor Author

arikorn commented Mar 2, 2026

Thanks for merging Julian!
You wrote:

but yeah, Ill merge this and the rest can be a separate pr (through either approach)

Just let me know. If you want to have it done in the server, I could probably submit a PR on it, if you want. If on the UI-side, I'll have to defer to you to do it.

(oops. forgot to send)

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.

[BUG] Triggers disable collection doesn't always work

2 participants