Repository navigation
Show the template ID without Templates read on lists, broadcasts, automations and segments - #536
Merged
Merged
Conversation
…omations and segments The template fields of these screens now get the member's Templates read permission: without it they show the stored template ID with a lock explaining why, and the screens no longer request templates the member cannot read. Broadcast cards and automation email nodes name their template by ID instead of "Untitled" or "Template set".
Tests now check every drawer of the broadcast and automation pages, including the edit drawers and the empty pages. The lists page shows neither the template ID nor a preview while the permissions load, the lock is reachable by keyboard, and the changelog says only the fields carry it.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #536 +/- ##
==========================================
- Coverage 88.97% 88.96% -0.01%
==========================================
Files 377 377
Lines 73836 73836
==========================================
- Hits 65692 65690 -2
- Misses 5435 5436 +1
- Partials 2709 2710 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 12, 2026
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.
What
#520 fixed the transactional notification drawer only. This PR applies the same fix to the lists, broadcasts, automations and segments screens. For a member without Templates read,
templates.listandtemplates.getanswer 403, so these screens showed a blank template field. Now:Each page passes
!!permissions?.templates?.readdown. These props are required:CreateListDrawerUpsertBroadcastDrawerChangeVariationSenderModalUpsertAutomationDrawerandAutomationProvider(which put it in the editor context)SegmentsFilterandButtonUpsertSegmentThe leaf components default it to
true.No backend change, no migration, no environment variable, no docs change.
Plan and tests
Plan:
plans/fix-template-selectors-without-templates-read-plan.md, which lists the test file and cases for every implementation file. Each test checks behaviour both with and without the permission. Test files:TemplateSelectorInputListDrawer(new)ListsPageUpsertBroadcastDrawerVariationSenderSelectChangeVariationSenderModalBroadcastsPage.templatesRead(new)AutomationContextNodeConfigPanelTriggerConfigFormEmailConfigForm(new)ConditionsFieldEmailNodeUpsertAutomationDrawer(new)AutomationsPageform_leaf_templates_read(new)button_upsert_previewSegmentsFilter(new)ContactsPagecd console && npm run lingui:extract && npx vitest run && npx tsc -b && npx eslint . && npm run buildpasses locally: 249 files, 4533 tests. The new string is translated in the 8 catalogues.Known, not handled
with_templates: true. The server then tries each variation's template and logs the refusal.