LC-001 Saved Notes
Product Context
- Product brief:
Notes
- Related project doc:
Persistence overview
- Related ADR:
ADR-0003 Durable note storage
Writers need their work to survive refreshes and later sessions without wondering whether the last edit
reached durable storage.
Outcome
Signed-in writers can save a valid note and load the same content later. A failed save leaves their draft
intact and explains what happened.
Current Scope
- Create and update one writer-owned note.
- Report save state and reload persisted content.
Deferred Scope
- Sharing, version history, collaborative editing, and offline conflict resolution.
Candidate Stories
None. Future ideas remain outside accepted Story truth until promoted.
Story Index
| Story |
Implementation |
Verification |
Capability |
Last Verified |
Notes |
S1 |
implemented |
verified |
Save a note. |
2026-07-22 |
|
Stories
Story S1: Save a note
Implementation: implemented
Verification:
verified
Created: 2026-07-01
Modified: 2026-07-22
Last
verified: 2026-07-22
As a writer, I want to save my note, so that I can return to the same work later.
Requirements And Scenarios
Requirement R1: Durable save
The application SHALL persist valid note content for the signed-in writer and preserve the current draft
when persistence fails.
Scenario R1-S1: Save and reload
- WHEN the writer saves a valid title and body
- THEN the note is persisted and the saved state is shown
- AND reloading returns the same title and body
Scenario R1-S2: Persistence rejects the save
- WHEN storage rejects the save
- THEN the unsaved title and body remain in the editor
- AND the writer sees a retryable error
Implemented By
| Requirement / Scenario |
Location / Anchor |
Kind |
Responsibility |
S1/R1 |
src/notes/save-note.ts#saveNote |
primary |
Owns validation, persistence, and the returned save state. |
S1/R1-S2 |
src/notes/editor.ts#handleSaveFailure |
support |
Preserves the active draft and presents the retryable failure. |
Implementation Gaps
Verified By
| Requirement / Scenario |
Evidence |
Proves |
Status |
S1/R1-S1 |
Automated test test/notes/save-note.test.ts#saves and reloads a note |
The persisted note is returned after a fresh load. |
Passing 2026-07-22 |
S1/R1-S2 |
Automated test test/notes/save-note.test.ts#keeps edits when save fails |
An injected failure preserves content and exposes a retry. |
Passing 2026-07-22 |
Verification Gaps
Story Notes
saveNote owns the save contract. The editor is supporting UI behavior, not a second
implementation owner.
Cross-Story Concerns
- The authenticated writer ID scopes ownership. The server assigns modification timestamps.
Open Decisions
- None for the accepted scope.
Completion Criteria
This Epic is healthy when:
- Story state matches its implementation and verification maps.
- Both Scenarios have named proof.
- No current implementation or verification gap is hidden.
- Related Changes and documentation do not contradict this Epic.
Notes
- Paths and test titles are illustrative. The important shape is the path from accepted behavior to
implementation ownership and proof.