Notechondria
Version: 0.1.5 Build Date: 2026-04-07T07:00
What's Changed
Note UUID routing and access policy
-
Added
uuid(UUIDField, unique, auto-generated) to the Note model with a safe three-step migration (add nullable, backfill, enforce unique constraint). -
Added
note_typefield (CharField, choices:N=Normal,C=Comment) andsource_noteself-referential ForeignKey for comment notes. When a source note is deleted, its comments become private (not deleted). -
New API endpoint
GET/PATCH/DELETE /api/v1/notes/uuid/<uuid>/(NoteByUuidApiView) with full access control: public notes readable by anyone, private notes only by the owner, edits/deletes restricted to owner. Response includescan_editboolean. -
Existing
NoteDetailApiView.getnow also returnscan_edit. -
NoteSummarySerializerandNoteDetailSerializerincludeuuid,note_type, andsource_note_uuid. -
NoteWriteSerializeracceptsnote_typeandsource_note_uuidfor creating comment notes. -
Frontend URL routing: hash-based deep links at
#/notes/<uuid>. URL updates on note select/create/save. Deep-linked notes auto-open in editor (owner) or read-only viewer (non-owner). - "Copy link" button in both the note editor toolbar and note viewer options menu.
- 11 new backend tests covering UUID lookup, access control, comment creation, source-delete privacy, and 404 handling.
Files Changed
backend/notes/models.py-- Addeduuid,note_type,source_notefields to Note modelbackend/notes/migrations/0013_add_uuid_note_type_source_note.py-- Three-step migration with UUID backfillbackend/notes/api.py--NoteByUuidApiView, updated serializers, comment privacy on deletebackend/notechondria/api_urls.py-- Addednotes/uuid/<uuid>/routebackend/notes/tests.py-- 11 new tests inNoteUuidApiTests, fixed anonymous notes testfrontend/editor_app/lib/main.dart-- Addeddart:js_interopandpackage:webimportsfrontend/editor_app/pubspec.yaml-- Addedweb: ^1.1.0dependencyfrontend/editor_app/lib/core/client.dart--getNoteByUuid()methodfrontend/editor_app/lib/app_shell.dart-- URL routing helpers, deep-link bootstrap,_openNoteByUuid,_showNoteDialogForDeepLink, URL sync on select/create/savefrontend/editor_app/lib/components/note_viewer.dart-- "Copy link" menu itemfrontend/editor_app/lib/modules/note_editor.dart-- "Copy link" toolbar button