Skip to content

feat: support '*' wildcard on department for subscriptions#8

Open
BatLeDev wants to merge 1 commit into
mainfrom
feat-subscription-department-wildcard
Open

feat: support '*' wildcard on department for subscriptions#8
BatLeDev wants to merge 1 commit into
mainfrom
feat-subscription-department-wildcard

Conversation

@BatLeDev

Copy link
Copy Markdown
Member

Support a * wildcard on a subscription's sender.department, so an "any-department" subscription receives both root (no-department) and departmental events for the organization.

Why: let a root member subscribe once to a topic across every department of an org, instead of subscribing per department.

Also in this branch: aligns the Playwright config with the data-fair/portals template — test-unit/test-api/test-e2e scripts, an e2e-warmup project that pre-compiles heavy Vite dev routes before the e2e specs, and explicit timeouts. ui/index.html also gains <meta name="robots" content="noindex"> to match the portals template.

Regression risks:

  • getSubscriptionsFilter now builds a $or on sender.department instead of a scalar equality; behavior intentionally broadens so * subscriptions also match. $or is set in only one place in the function, so there's no clobbering.
  • CI retries goes from 0 to 1, which can mask newly-flaky tests.
  • noindex on the UI stops search engines indexing it.

@BatLeDev BatLeDev force-pushed the feat-subscription-department-wildcard branch from eab2266 to 744f173 Compare June 10, 2026 13:43
A subscription can now use `sender.department: '*'` to receive every event
of an organization regardless of department. Previously the `*` value was
stored and matched literally, so such a subscription matched nothing.

`getSubscriptionsFilter` now broadens the department clause: a root event
(no department) matches subscriptions without a department or with `*`, and
a departmental event matches its own department or `*`. Broadcast events
(`department: '*'`) keep matching every subscription as before.

Also add `<meta name="robots" content="noindex">` to ui/index.html.

Ref: koumoul/plateforme work item 1739
@BatLeDev BatLeDev force-pushed the feat-subscription-department-wildcard branch from 744f173 to 0793d91 Compare June 10, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant