mirror of
https://github.com/niels-emmer/myace.git
synced 2026-09-13 23:53:30 +02:00
[PR #148] [MERGED] feat: pre-compile name-collision preview in profile composer #148
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
github-mirrors/myace#148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/niels-emmer/myace/pull/148
Author: @niels-emmer
Created: 9/1/2026
Status: ✅ Merged
Merged: 9/1/2026
Merged by: @niels-emmer
Base:
main← Head:feat/pre-compile-collision-preview📝 Commits (1)
390f105feat: pre-compile name-collision preview in profile composer📊 Changes
5 files changed (+475 additions, -3 deletions)
View changed files
📝
frontend/src/components/ProfileForm.tsx(+55 -1)➕
frontend/src/lib/collisions.test.ts(+117 -0)➕
frontend/src/lib/collisions.ts(+81 -0)➕
frontend/src/pages/ProfileComposer.test.tsx(+173 -0)📝
frontend/src/pages/ProfileComposer.tsx(+49 -2)📄 Description
What does this change?
Adds a pre-compile name-collision preview to the Profile Composer create form. When a user composes a profile (one base + several additional collections), the form now fetches the selected collections' artifacts and runs a client-side mirror of
compile_profile()'s rule-29 dedup step, rendering an advisory amber panel that names each colliding artifact, both collections, and the winner — before the profile is saved. Each collision has a "Disable in this profile" action that adds the losing artifact's id todisabled_artifact_ids(a fieldcompile_profile()already respects), so the user can resolve the collision at edit time instead of discovering it on/build/compile.Pure frontend change: no backend, no new endpoint, no migration. The preview replicates the backend's exact semantics so it stays consistent with what compilation actually does.
Related issue
N/A — follow-up feature to the rule-29 collision work (see
docs/plans/pre-compile-collision-preview.md).Type of change
How was this tested?
cd frontend && npm run test— 106 tests pass (21 files), including 8 new unit tests fordetectNameCollisions()and 3 new component tests for the panel + disable action.cd frontend && npm run lint— 0 errors (8 pre-existing warnings in untouched files).cd frontend && npm run build—tsc -bandvite buildboth clean.Open questions — decisions made
Per the plan's "Open questions" section, here are the decisions made during implementation:
useQueriesfan-out lives inProfileComposer.tsx(it already owns data-fetching); the collision list and a disable handler are passed down toProfileForm.tsx, where the panel renders colocated with the collection pickers. This matches the plan's leaning towardProfileForm.tsxfor colocation while keeping the data-fetching where the component already has it.Checklist
CONTRIBUTING.mdpytest/npm run test/npx tsc -bas applicable)downgrade()(N/A — no schema change)README.md,AGENTS.md/CLAUDE.md, and/ordocs/if this change affects what they document (N/A — pure UX addition; compile-time warning behavior unchanged)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.