Link groups model and grouped card containers #41
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?
Type
Feature
Lineage
Depends on
ldraney/palinks #40(canvas view with activity-based card sizing).Related to
ldraney/palinks #36(clicks table) for aggregate group tracking.Repo
ldraney/palinksUser Story
As a palinks user
I want to group related links into a parent card that contains their individual cards
So that related links stay spatially together on the canvas and I can track their activity as a unit
Context
With the canvas layout in place (#40), links need a grouping mechanism. A link group is a named container that houses multiple link cards. On the canvas, the group renders as a larger parent card with its children arranged inside it. Groups track aggregate click activity (sum of member clicks) for their own sizing. Grouped links always move together — dragging the group card repositions all children.
Groups are optional — links can exist ungrouped on the canvas. A link belongs to at most one group.
File Targets
Files the agent should modify or create:
db/migrate/*_create_link_groups.rb—link_groupstable: name, description, canvas_x, canvas_y, color (optional)db/migrate/*_add_group_id_to_links.rb— addlink_group_idforeign key to linksapp/models/link_group.rb— has_many :links, aggregate click count method, canvas positionapp/models/link.rb— belongs_to :link_group (optional), scope for ungroupedapp/views/links/_link_group.html.erb— group container partial with nested link cardsapp/views/links/index.html.erb— render groups and ungrouped links on canvasapp/javascript/controllers/canvas_controller.js— group drag moves all children, group collapse/expand (file created by #40)app/controllers/link_groups_controller.rb— CRUD for groups, add/remove linksconfig/routes.rb— link_groups resource routesFiles the agent should NOT touch:
app/javascript/controllers/sortable_controller.js— legacy grid orderingFeature Flag
Flag:
link_groupsType: global
Default: disabled
Visibility: superadmin only
Removal: after 2 weeks stable
Acceptance Criteria
Test Expectations
bin/rails testConstraints
Checklist
Related
palinks— project this affects#40— canvas view (direct dependency, must ship first)#36— clicks table (transitive dependency via #40)Scope Review: NEEDS_REFINEMENT
Review note:
review-1407-2026-06-09Ticket is well-structured with all template sections present, but has unresolved dependency and traceability gaps that prevent advancement.
Issues found:
#39but the canvas view issue is#40— fix the referencestory:canvas-layoutis not listed in the project-palinks user-stories section — needs entry createdarch-palinksnote missing in pal-e-docs (board-wide gap, not unique to this ticket)docs/feature-flags.mdconfirms "pending implementation") — thelink_groupsflag cannot be created until the flag infrastructure exists. Add as explicit dependency or defer the flag section.canvas_controller.jsdoes not exist yet — created by #40 (canvas view), which is still in backlogskill-decompose-ticketafter dependencies (#36, #40, flag system) land. Suggested split: (1) model/migrations/routes, (2) controller/CRUD, (3) view/canvas integration.Scope refinement (2026-06-09):
Changes from scope review
review-1407-2026-06-09:#39to#40(correct canvas view issue number)canvas_controller.jsis created by #40, this ticket extends itAcknowledged but not blocking this ticket:
story:canvas-layoutnot yet in project-palinks user-stories — cross-cutting gaparch-palinksnote missing — board-wide gap, tracked separatelyScope Review: APPROVED
Review note:
review-1407-2026-06-09-r2Re-review after refinement. All blocking issues from the previous NEEDS_REFINEMENT review (
review-1407-2026-06-09) are resolved:Remaining non-blocking [SCOPE] items (cross-cutting gaps with established precedent):
story:canvas-layoutuser story entry missing from project-palinksarch-palinksarchitecture note missing from pal-e-docs[DECOMPOSE] deferred: when this ticket moves from backlog to todo (after #40 ships), route to
skill-decompose-ticketfor sub-ticket creation.