feat(docs): S-DOCS1 v2 — Notion-style always-editable + autosave#246
Merged
AngryJay91 merged 2 commits intomainfrom Apr 15, 2026
Merged
feat(docs): S-DOCS1 v2 — Notion-style always-editable + autosave#246AngryJay91 merged 2 commits intomainfrom
AngryJay91 merged 2 commits intomainfrom
Conversation
- Remove editing mode toggle (editing state, Edit/Save/Cancel buttons, click-to-edit) - Always mount DocEditor as single tiptap instance; editable prop is permission-based - Wire useDocSync debounce autosave (1500ms) via always-on editing gate (selectedDoc !== null) - Add SaveStatusIndicator: shows Saving/Saved/Unsaved/Error/Conflict/Remote-changed - Title always rendered as <Input> (no heading-vs-input conditional) - Export getDocSaveStatusText pure helper for unit tests (8 tests, all pass) - Drop removed props (mode, onModeChange) from DocEditor; fix page-old.tsx callsite Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Extract createAutosaveScheduler pure factory from useDocSync (exported for tests)
- Add use-doc-sync.test.ts: 6 fake-timer tests covering debounce coalescing + PATCH mock
(AC 7: "tiptap onUpdate → debounce → PATCH" & "빠른 연속 입력 1회 병합")
- Fix handleRename double-save: parse full PATCH response and setSelectedDoc(data) so
updated_at propagates to useDocSync → resets lastSavedSnapshot → no spurious autosave
- Add TODO comment on editable={true} for future RBAC integration point
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
editingstate, Edit/Save/Cancel 버튼, 클릭 진입 로직 전부 삭제DocEditor단일 인스턴스를 항상 렌더.editableprop 추가 (권한 기반)useDocSync1500ms debounce 재사용.editing게이트 =selectedDoc !== null(항상 활성)<Input>(heading ↔ input 조건부 렌더 제거)page-old.tsxcallsite: 제거된 props (mode,onModeChange,editorModelabel) 정리Files changed
docs-shell-client.tsxdoc-editor.tsxeditableprop 추가, mode toggle 제거docs-shell-client.test.tsxpage-old.tsxTest plan
pnpm test docs-shell-client→ 8/8 passpnpm tsc --noEmit→ 0 errors🤖 Generated with Claude Code