ENG-2097 Exclude Page, Block, and Any from relation endpoint selectors - #1298
ENG-2097 Exclude Page, Block, and Any from relation endpoint selectors#1298sid597 wants to merge 1 commit into
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8eccc274b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const configuredNodeTypes = discourseNodes | ||
| .filter(excludeDefaultNodes) | ||
| .map((n) => n.type); |
There was a problem hiding this comment.
Add unit coverage for endpoint option filtering
This introduces new selector-filtering behavior without a unit test proving that default Page/Block nodes and synthetic Any are excluded while user-configured node types remain selectable. A regression in getDiscourseNodes or this filtering logic could silently restore invalid relation endpoints or remove valid ones, and the repository explicitly requires unit tests for new functionality.
AGENTS.md reference: AGENTS.md:L82-L85
Useful? React with 👍 / 👎.
Builds the relation editor's Source and Destination options from configured discourse node types only (via the existing
excludeDefaultNodes), soPage,Block, andAnycan no longer be saved as new relation endpoints.The full node map still includes Page/Block/Any because the relations table, sorting, and the selector's current-value button use it to display existing relations with generic endpoints — migrating those is out of scope per the ticket.
MenuItemSelectrendersactiveItemindependently ofitems, so editing such a relation still shows its current endpoint; it just can't be selected anew.Closes ENG-2097