feat: add local-first stateless template storage and sharing - #83
feat: add local-first stateless template storage and sharing#83Turtle-Hwan wants to merge 13 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44b3b91d50
ℹ️ 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".
| return { | ||
| iconId: -Math.floor(Math.random() * Number.MAX_SAFE_INTEGER), | ||
| iconName: icon.name, | ||
| iconUrl: icon.dataUrl, |
There was a problem hiding this comment.
Persist imported data icons with editable IDs
When a shared template contains an embedded PNG/JPEG/WebP icon, this assigns it a negative ID without registering it in the IndexedDB asset repository. The editor initializes its icon selector from that negative ID, but linkFormSchema rejects non-positive IDs and ItemPropertiesPanel can only resolve icons from the bundled/asset lists, so users cannot save name, URL, position, or size changes for the imported item unless they replace its icon. Persist the embedded icon as an asset or preserve it as a valid editable selection.
Useful? React with 👍 / 👎.
| Number(position.x) + Number(size.width) > 6 || | ||
| Number(position.y) + Number(size.height) > 6 |
There was a problem hiding this comment.
Validate item bounds against the declared template height
For an imported file or untrusted fragment whose template.height is less than 6, an item can pass validation while lying below the template—for example, height: 1 with an item at y: 5. Template cards and the share viewer size their preview from template.height and clip overflow, so such accepted items disappear from the preview and produce an inconsistent imported layout. Pass the declared height into item validation and require position.y + size.height <= template.height rather than only checking the global six-row maximum.
Useful? React with 👍 / 👎.
요약
서버가 내려가 있어도 개인 템플릿 기능이 브라우저 안에서 완결되도록 stateless 기반을 분리합니다.
.linku.json파일로 공유의도적으로 제외한 범위
다음 기능은 이어지는 Cloudflare stateful PR에서 추가합니다.
검증
pnpm run test:feedback(3 passed)pnpm run test:forms(3 passed)pnpm run test:todo(4 passed)pnpm run test:timetable(10 passed)pnpm run test:template-share(5 passed)pnpm run build:localpnpm run build:gh-pagespnpm run lint검증 제한
자동화 브라우저의 보안 정책으로
chrome://extensions접근이 차단되어 이번 세션에서는 빌드된 unpacked extension을 직접 로드하지 못했습니다. 실제 extension runtime의 OAuth/storage/service-worker 통합 검증은 후속 수동 확인 항목입니다.