Canvas view with activity-based card sizing #40
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 #36(clicks table) for activity data.Prerequisite for
ldraney/palinks #41(link groups).Repo
ldraney/palinksUser Story
As a palinks user
I want my links displayed on a spatial canvas where frequently-used links appear larger
So that my most valuable links are immediately visible and I can organize links spatially
Context
palinks currently renders links in a flat CSS grid with manual drag-and-drop ordering. The vision is to replace this with a freeform canvas where cards are absolutely positioned and their size scales dynamically based on click activity — more clicks = bigger card, rarely used = smaller card. This creates an organic, activity-driven layout where the most valuable links naturally surface.
Architecture decision: HTML/CSS canvas with absolute positioning and
transform: scale()rather than<canvas>/WebGL. This preserves Turbo/Stimulus integration, native DOM link behavior, and is dramatically simpler to build for the scale of a personal link manager.File Targets
Files the agent should modify or create:
db/migrate/*_add_canvas_position_to_links.rb— addcanvas_x,canvas_yfloat columns to links (nullable, null = needs initial placement)app/models/link.rb— canvas position defaults, scale calculation method based on click countapp/views/links/index.html.erb— replace grid layout with canvas containerapp/views/links/_link.html.erb— add inline style for position/scale transformsapp/javascript/controllers/canvas_controller.js— pan (click-drag on background), zoom (scroll wheel), drag-to-reposition cardsapp/assets/stylesheets/application.css— canvas container styles, card scaling transitionsFiles the agent should NOT touch:
app/javascript/controllers/sortable_controller.js— legacy grid ordering, will be deprecated separatelyFeature Flag
Flag: none
Rationale: The target flag is
canvas_layoutbut the feature_flags table (#34) andfeature_enabled?helper don't exist yet. Canvas view ships as the default layout; flag gate added when #34 lands.Acceptance Criteria
Test Expectations
bin/rails testConstraints
transform: scale()for card sizing, not width/height manipulationpositioncolumn, then save canvas_x/canvas_y so it only happens onceChecklist
Related
palinks— project this affects#36— clicks table (direct dependency)#41— link groups (depends on this)Scope Review: NEEDS_REFINEMENT
Review note:
review-1406-2026-06-09Template is complete and file targets all verified, but traceability and dependency gaps need attention before this moves to next_up.
story:canvas-layoutis not listed in theproject-palinksuser-stories section -- add itScope refinement (2026-06-09):
Changes from scope review
review-1406-2026-06-09:Acknowledged but not blocking:
story:canvas-layoutnot in project-palinks user-stories — cross-cutting gap, same as #41Scope Review: APPROVED
Review note:
review-1406-2026-06-09-r2Re-review after refinement. All 4 items from the previous NEEDS_REFINEMENT review (
review-1406-2026-06-09) have been addressed:Flag: nonecanvas_x/canvas_ystory:canvas-layoutuser story gap acknowledged as cross-cutting, not blocking (precedent from #36, #41)Scope is solid. Ready for
next_up.