Skip to content

✨ Add thoughts canvas layout editor with pin, resize, and save - #55

Merged
yuler merged 10 commits into
mainfrom
edit-thoughts-canvas-layout
Aug 12, 2026
Merged

✨ Add thoughts canvas layout editor with pin, resize, and save#55
yuler merged 10 commits into
mainfrom
edit-thoughts-canvas-layout

Conversation

@yuler

@yuler yuler commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a local development editor for the thoughts canvas with drag, rotate, pin, resize, and a saved starting view.
  • Persist card coordinates, rotation, size, and pins to source JSON so static builds render the authored layout.
  • Default thoughts to canvas mode on mobile, keep mobile positions independent of desktop overrides, and bump Node.js to v26 with a chokidar trust-policy exception.
  • Sync package.json specifiers with pnpm-lock.yaml so CI frozen-lockfile installs succeed.

Test plan

  • pnpm install --frozen-lockfile
  • pnpm check
  • pnpm test -- --run
  • pnpm build

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces interactive layout editing capabilities for the thoughts canvas in development mode, allowing users to drag, rotate, and save card positions directly to a JSON file via a custom Vite dev server plugin. The feedback highlights critical issues regarding responsiveness and layout corruption, specifically noting that saving from a mobile viewport writes incorrect coordinates to the shared layout file, and that applying the same overrides to both desktop and mobile views breaks the mobile layout. Additionally, the reviewer identified erratic rotation behavior due to an incorrect transform origin (origin-top-left instead of origin-center), suggested storing a direct reference to the rotate handle in the drag state for safer cleanup, and recommended adding safeguards to prevent state updates on a destroyed controller during active save operations.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/components/thoughts/thoughts-canvas-controller.ts
Comment thread src/pages/thoughts.astro Outdated
Comment thread src/pages/thoughts.astro Outdated
Comment thread src/components/thoughts/thoughts-canvas-controller.ts
Comment thread src/components/thoughts/thoughts-canvas-controller.ts
Comment thread src/components/thoughts/thoughts-canvas-controller.ts
Comment thread src/components/thoughts/thoughts-canvas-controller.ts
@yuler

yuler commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a development-only layout editor for the thoughts canvas, allowing users to drag, rotate, and save card positions directly to a local JSON file via a custom Vite plugin. The feedback identifies a layout issue where desktop-edited coordinates leak into mobile viewports, causing cards to misalign or fly off-screen, and suggests restricting these overrides to the desktop media query. Additionally, it recommends collecting stream chunks as buffers in the dev server middleware to prevent potential UTF-8 encoding corruption.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/pages/thoughts.astro
Comment thread astro.config.mjs Outdated
@yuler
yuler force-pushed the main branch 2 times, most recently from c1e1c31 to 20c8801 Compare August 4, 2026 06:37
yuler and others added 2 commits August 11, 2026 14:58
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor
📸 Screenshots for PR #55
page iphone ipad pc
home home iphone home ipad home pc
posts posts iphone posts ipad posts pc
posts-hi posts-hi iphone posts-hi ipad posts-hi pc
thoughts thoughts iphone thoughts ipad thoughts pc
workouts workouts iphone workouts ipad workouts pc
workouts-17883105335 workouts-17883105335 iphone workouts-17883105335 ipad workouts-17883105335 pc

PR screenshots folder (branch pr-screenshots)

github-actions Bot added a commit that referenced this pull request Aug 11, 2026
github-actions Bot added a commit that referenced this pull request Aug 11, 2026
Scope edit-x/edit-y overrides to desktop media query so mobile keeps
x-mob/y-mob; collect request chunks as buffers before UTF-8 decode.

Co-authored-by: Cursor <cursoragent@cursor.com>
github-actions Bot added a commit that referenced this pull request Aug 11, 2026
@yuler yuler changed the title ✨ Add editable thoughts canvas layout ✨ Add dev-mode thoughts canvas layout editor Aug 11, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
github-actions Bot added a commit that referenced this pull request Aug 11, 2026
yuler and others added 3 commits August 11, 2026 15:19
Co-authored-by: Cursor <cursoragent@cursor.com>
…view

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@yuler yuler changed the title ✨ Add dev-mode thoughts canvas layout editor ✨ Add thoughts canvas layout editor with pin, resize, and save Aug 12, 2026
github-actions Bot added a commit that referenced this pull request Aug 12, 2026
@yuler
yuler merged commit ad8cd5a into main Aug 12, 2026
3 checks passed
@yuler
yuler deleted the edit-thoughts-canvas-layout branch August 12, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant