diff --git a/README.md b/README.md index 19ece61..b98ccb8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# ~~Writer~~ Commonplace +# Commonplace Commonplace is a distraction-free markdown editor. diff --git a/docs/architecture.md b/docs/architecture.md index fd2a03b..02fc113 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -5,7 +5,7 @@ last_updated: 2026-03-21 ## System Overview -Writer is a desktop app with: +Commonplace is a desktop app with: - Frontend: React + TypeScript (`src/`) - Backend: Tauri command layer (`src-tauri/`) + Rust workspace crates (`crates/`) diff --git a/docs/export.md b/docs/export.md index 6aec1cf..70b78df 100644 --- a/docs/export.md +++ b/docs/export.md @@ -5,7 +5,7 @@ last_updated: 2026-03-24 ## Overview -Writer ships a unified export dialog with three primary output formats: +Commonplace ships a unified export dialog with three primary output formats: - PDF - DOCX diff --git a/docs/nlp.md b/docs/nlp.md index f465406..2f93fff 100644 --- a/docs/nlp.md +++ b/docs/nlp.md @@ -5,7 +5,7 @@ last_updated: 2026-02-28 ## Current Features -Writer includes two writing-assist features: +Commonplace includes two writing-assist features: - Style Check - Parts-of-Speech (POS) highlighting diff --git a/docs/release.md b/docs/release.md index 79497ac..47b897e 100644 --- a/docs/release.md +++ b/docs/release.md @@ -1,4 +1,4 @@ -# Releasing Writer +# Releasing Commonplace Releases are produced by GitHub Actions workflow: diff --git a/docs/specs/archives-trash.md b/docs/specs/archives-trash.md index 987168c..cd484c5 100644 --- a/docs/specs/archives-trash.md +++ b/docs/specs/archives-trash.md @@ -15,7 +15,7 @@ All deletions are permanent and immediate — `std::fs::remove_file` / `remove_d ### Two Concepts 1. **Archive** — User-initiated. Moves a document out of the active sidebar into a separate "Archive" section. The file stays on disk in its original location. Reversible. -2. **Trash** — Triggered by "Delete". Soft-deletes the document. File moves to a `.writer-trash/` directory. Auto-purged after 30 days. Reversible within the retention window. +2. **Trash** — Triggered by "Delete". Soft-deletes the document. File moves to a `.trash/` directory. Auto-purged after 30 days. Reversible within the retention window. ### Database Schema Changes @@ -54,11 +54,11 @@ pub struct DocMeta { ```sh / - .writer-trash/ + .trash/ __.md ``` -- When trashed, the file is **moved** from its original path into `.writer-trash/`. +- When trashed, the file is **moved** from its original path into `.trash/`. - The filename encodes the original relative path (URL-encoded to flatten subdirs) and a timestamp for uniqueness. - The SQLite index retains the row with `status = 'trashed'` and the original `rel_path` for restore. @@ -90,7 +90,7 @@ pub fn doc_unarchive(location_id: LocationId, rel_path: PathBuf) -> Result Result ``` -- Moves file from original path → `.writer-trash/`. +- Moves file from original path → `.trash/`. - Updates index: `status = 'trashed'`, `status_changed_at = now()`. #### `doc_restore` @@ -100,7 +100,7 @@ pub fn doc_trash(location_id: LocationId, rel_path: PathBuf) -> Result Result ``` -- Moves file from `.writer-trash/` back to original path. +- Moves file from `.trash/` back to original path. - If original path is occupied (name collision), appends `(restored)` before the extension. - Updates index: `status = 'active'`, clears `status_changed_at`. @@ -114,7 +114,7 @@ pub fn doc_delete(location_id: LocationId, rel_path: PathBuf) -> Result>` - [ ] Update all queries that list/fetch documents to include `status` field - Default sidebar queries filter to `status = 'active'` -- [ ] Add `.writer-trash/` directory creation on location init +- [ ] Add `.trash/` directory creation on location init ## Phase 2: Tauri Commands (Archive) @@ -28,15 +28,15 @@ updated: 2026-03-21 ## Phase 3: Tauri Commands (Trash) - [ ] Implement `doc_trash` command - - Move file to `.writer-trash/__.md` + - Move file to `.trash/__.md` - Update index: `status = 'trashed'`, `status_changed_at = now()` - [ ] Implement `doc_restore` command - - Move file from `.writer-trash/` back to original path + - Move file from `.trash/` back to original path - Handle name collisions (append `(restored)`) - Update index: `status = 'active'` - [ ] Modify existing `doc_delete` to only operate on trashed documents - Refuse to permanently delete `active` or `archived` docs - - Remove file from `.writer-trash/` and delete index row + - Remove file from `.trash/` and delete index row - [ ] Implement `trash_empty` command - Permanently delete all trashed documents in a location - Return count @@ -75,8 +75,8 @@ updated: 2026-03-21 ## File Watcher Sync - [ ] If a file reappears at a previously trashed path, update status to `active` -- [ ] If a trashed file disappears from `.writer-trash/`, remove index row -- [ ] Exclude `.writer-trash/` from normal document indexing +- [ ] If a trashed file disappears from `.trash/`, remove index row +- [ ] Exclude `.trash/` from normal document indexing ## Test Plan diff --git a/docs/tasks/standard-site.md b/docs/tasks/standard-site.md index cbe6149..fff5a0c 100644 --- a/docs/tasks/standard-site.md +++ b/docs/tasks/standard-site.md @@ -50,4 +50,4 @@ Pull and push long-form posts from/to AT Protocol publishing platforms using Sta 1. **Re-publish detection** — detect local modifications to previously published posts, surface "Update Post" action 2. **Re-pull detection** — compare `updatedAt` / content hash to detect remote changes, prompt with diff -3. **Publication management** — create new publications from Writer (future, dependent on Standard.Site ecosystem maturity) +3. **Publication management** — create new publications from Commonplace (future, dependent on Standard.Site ecosystem maturity) diff --git a/package.json b/package.json index 6c7d76d..9d09f77 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "writer", + "name": "commonplace", "private": true, "version": "0.2.0", "type": "module", diff --git a/src/App.css b/src/App.css index 8b4bbd1..a139738 100644 --- a/src/App.css +++ b/src/App.css @@ -9,10 +9,10 @@ Roboto, sans-serif; --font-headline: "Google Sans Variable", var(--font-sans); --font-serif: - "Writer IBM Plex Serif", "IBM Plex Serif", Georgia, "Times New Roman", + "Commonplace IBM Plex Serif", "IBM Plex Serif", Georgia, "Times New Roman", serif; --font-mono: - "JetBrains Mono Variable", "Writer IBM Plex Mono", "IBM Plex Mono", + "JetBrains Mono Variable", "Commonplace IBM Plex Mono", "IBM Plex Mono", "SF Mono", Monaco, "Cascadia Code", monospace; --radius: 0.125rem; diff --git a/src/__tests__/Editor.test.tsx b/src/__tests__/Editor.test.tsx index 4c62f19..515dbc1 100644 --- a/src/__tests__/Editor.test.tsx +++ b/src/__tests__/Editor.test.tsx @@ -64,7 +64,7 @@ describe(Editor, () => { render(); const container = screen.getByTestId("editor-container"); expect(container).toHaveStyle( - "--editor-font-family: \"Writer IBM Plex Sans\", \"IBM Plex Sans\", -apple-system, BlinkMacSystemFont, sans-serif", + "--editor-font-family: \"Commonplace IBM Plex Sans\", \"IBM Plex Sans\", -apple-system, BlinkMacSystemFont, sans-serif", ); expect(container).toHaveStyle("--editor-font-size: 19px"); }); diff --git a/src/__tests__/LayoutSettingsRoute.test.tsx b/src/__tests__/LayoutSettingsRoute.test.tsx index 4793c0d..5e7ef6f 100644 --- a/src/__tests__/LayoutSettingsRoute.test.tsx +++ b/src/__tests__/LayoutSettingsRoute.test.tsx @@ -63,7 +63,7 @@ describe("Layout settings routing", () => { expect(screen.queryByText("Part of Speech Colors")).not.toBeInTheDocument(); - fireEvent.click(screen.getByRole("button", { name: /Writer's Tools/ })); + fireEvent.click(screen.getByRole("button", { name: /Writing Tools/ })); fireEvent.click(screen.getByRole("switch", { name: "Parts of Speech Highlighting" })); expect(screen.getByText("Part of Speech Colors")).toBeInTheDocument(); diff --git a/src/__tests__/Support.test.tsx b/src/__tests__/Support.test.tsx index 01a545d..c368102 100644 --- a/src/__tests__/Support.test.tsx +++ b/src/__tests__/Support.test.tsx @@ -5,7 +5,7 @@ import { describe, expect, it } from "vitest"; describe("Support", () => { it("renders the support heading", () => { render(); - expect(screen.getByText("Support Writer")).toBeInTheDocument(); + expect(screen.getByText("Support Commonplace")).toBeInTheDocument(); }); it("renders the support description", () => { @@ -57,7 +57,7 @@ describe("Support", () => { it("renders the thank you message", () => { render(); - expect(screen.getByText("Thanks for using Writer!")).toBeInTheDocument(); + expect(screen.getByText("Thanks for using Commonplace!")).toBeInTheDocument(); }); it("applies custom className", () => { diff --git a/src/__tests__/dnd.test.ts b/src/__tests__/dnd.test.ts index 29bea9c..cf9da2f 100644 --- a/src/__tests__/dnd.test.ts +++ b/src/__tests__/dnd.test.ts @@ -150,7 +150,7 @@ describe("resolveDestinationFromPointer", () => { const folderRow = document.createElement("div"); folderRow.dataset.dropFolderRow = "true"; folderRow.dataset.locationId = "4"; - folderRow.dataset.folderPath = "projects/writer"; + folderRow.dataset.folderPath = "projects/commonplace"; folderRow.getBoundingClientRect = () => ({ left: 0, @@ -169,7 +169,7 @@ describe("resolveDestinationFromPointer", () => { const resolved = resolveDestinationFromPointer(100, 304); expect(resolved?.destination.locationId).toBe(4); expect(resolved?.destination.targetType).toBe("folder"); - expect(resolved?.destination.folderPath).toBe("projects/writer"); + expect(resolved?.destination.folderPath).toBe("projects/commonplace"); expect(extractClosestEdge(resolved?.destination)).toBe("top"); }); }); @@ -344,6 +344,6 @@ describe("normalizePointerCoordinates", () => { describe("announce", () => { it("creates a live region for screen reader updates", () => { announce("Dragging file"); - expect(document.querySelector("#writer-dnd-live-region")).toBeTruthy(); + expect(document.querySelector("#commonplace-dnd-live-region")).toBeTruthy(); }); }); diff --git a/src/__tests__/useEditorImageHandlers.test.ts b/src/__tests__/useEditorImageHandlers.test.ts index c07894a..c47146a 100644 --- a/src/__tests__/useEditorImageHandlers.test.ts +++ b/src/__tests__/useEditorImageHandlers.test.ts @@ -69,7 +69,7 @@ describe("useEditorImageHandlers", () => { expect(writeFile).toHaveBeenCalledOnce(); const [writtenPath, writtenBytes] = vi.mocked(writeFile).mock.calls[0]; - expect(writtenPath).toMatch(/^\/tmp\/writer-paste-\d+\.png$/); + expect(writtenPath).toMatch(/^\/tmp\/commonplace-paste-\d+\.png$/); expect(writtenBytes).toBeInstanceOf(Uint8Array); expect(mockImportImage).toHaveBeenCalledWith(7, expect.stringMatching(/\.png$/), "images"); diff --git a/src/components/AppLayout/AppHeaderBar.tsx b/src/components/AppLayout/AppHeaderBar.tsx index 01286a6..a7625b9 100644 --- a/src/components/AppLayout/AppHeaderBar.tsx +++ b/src/components/AppLayout/AppHeaderBar.tsx @@ -55,8 +55,8 @@ function HeaderActions({ onOpenHelp, onOpenSupport, onOpenSettings }: HeaderActi variant="iconGhost" size="iconMd" onClick={onOpenSupport} - title="Support Writer" - aria-label="Support Writer"> + title="Support Commonplace" + aria-label="Support Commonplace">