Commit History
-
feat(editor): inline author editor with affiliation typeahead and DnD
Simplify the Authors & affiliations modal UX without changing the data schema: - Add/edit authors inline (drop the separate AuthorInlineForm modal). - Attach affiliations via a single typeahead that matches an existing one or creates a new one in one gesture. - Collapse the affiliations list (reorder + rename + URL) behind a disclosure since it is rarely touched. - Replace up/down chevrons with a grip handle and native drag-and-drop reordering for both authors and affiliations. Store gains atomic addAuthor/updateAuthor (create + attach new affiliations in one transaction) and auto-prunes orphan affiliations with 1-based index remapping. The agent tooling and system prompt follow the new author-driven affiliation model. Co-authored-by: Cursor <cursoragent@cursor.com>53c7a9e
-
feat(editor): authors & affiliations manager modal
Replace the undiscoverable inline drag with a single, discoverable modal for the whole byline. From the hero (pencil button, clicking an author, or clicking an affiliation) users open AuthorsManager to add/edit/remove authors and affiliations and reorder both lists via explicit up/down controls. - store: add updateAffiliation/removeAffiliation; removeAffiliation reconciles every author's 1-based references (drop + shift) like moveAffiliation does - extract AuthorInlineForm into its own file, reused as the add/edit form (stacked dialog) inside the manager - affiliations get inline name/URL editing with debounced commits - drop the inline drag-and-drop handlers/styles from the displayed header Co-authored-by: Cursor <cursoragent@cursor.com>005eeff
-
feat(auth): surface canEdit in the topbar with an access badge
`/api/auth/status` already returned a `canEdit` flag derived from the HF whoami roleInOrg (Space owner, or org write/admin/contributor with a write resource group), but the frontend was ignoring it. Result: read-only users saw an enabled Publish button + the regular user chip, then hit a confusing 403 from the backend on every mutating action. - App.tsx plumbs `canEdit` from /api/auth/status into a new state and forwards it to TopBar. - TopBar renders a small badge next to the user chip: "Editor" (green outline + PencilLine icon) when canEdit, "Read-only" (muted + Lock icon) otherwise, both with a tooltip explaining the state. - Publish button is disabled when !canEdit with a matching tooltip, so the read-only restriction is visible up front instead of after a failed network round-trip. - `.chip--editor` and `.chip--readonly` variants added to _ui.css. Co-authored-by: Cursor <cursoragent@cursor.com>0e7d2a3
-
feat(storage): first-class data - no silent failures in the persistence pipeline
The "Saved" label in the top bar used to be a comforting lie: several failure modes (createRepo 403 on a missing manage-repos scope, writeFileSync on a readonly FS, uploadFile mid-debounce network blip) all collapsed into a console.error that the editor never surfaced. A user could type for an hour, see "Saved" the whole time, lose their tab, and discover only after the container rebuilt that nothing had ever made it to the dataset. Make every link in the chain observable, and make the worst signal always win in the UI. Backend ------- - In-memory `StorageStatus` tracker in hf-storage.ts: - `datasetReady` (createRepo succeeded or returned 409) - `lastLocalSaveAt` / `lastCloudPushAt` epoch ms - `pendingPush` (a debounce timer is armed) - `lastError {stage, message, statusCode, at, docName}` where `stage` is one of `dataset-create | local-save | cloud-push` Every write path records success; every error path records the failure. Success on one stage clears the error for …7a42df5
-
feat(demo): full showcase polish - mouse cursor, robust selection, HF affiliations
Demo orchestration: - Visible mouse cursor overlay (popover top-layer, MutationObserver to stay above native dialogs) + humanMove/humanClick/humanHover helpers - Yjs Node.js clients for Bob and Carol with awareness cursors and a set of high-level helpers (writeBlockMathAtSlot, setAffiliationUrl, waitForAffiliationCount, etc.) so peer interactions never collide - Pre-bold sync barrier: Alice waits for Bob's block math and Carol's code block to land before doing the bubble-toolbar bold so layout is frozen during the drag selection (no more cross-paragraph selections) - Progressive cursor-driven text selection (visible glide + step-wise setTextSelection) for bold and rephrase actions - Custom rAF-eased scroll-to-top on the actual .editor-scroll container before the hue drag so the banner retint reads on camera Embed Studio: - New architecture.json companion data file (transformer-block layers) seeded alongside model-accuracy.csv, so the agent has something concrete to r…f469961
-
fix(ui,publisher): kill theme/color flickers and translation prompts
- Published page and its banner iframe now inline a synchronous theme bootstrap in <head>, so the first paint already uses the correct data-theme (no dark -> light flicker on navigation). - <meta name="google|robots" content="notranslate"> on both the editor (frontend/index.html) and the published article so Chrome stops proposing to translate the page to French. - CollaborationCursorV3: silence a peer's caret + label (via the .collaboration-cursor--silenced class) when that same peer also broadcasts an agentFocus. Fixes the duplicate "<Name>" + "<Name> agent" labels that stacked while a chat action was active. - Embed Studio preview container pinned to --page-bg and the iframe element forced to background: transparent + color-scheme: light dark, so the preview tracks dark mode instead of falling through to the browser's default white. - App.tsx primaryHue sync: when the Yjs settings map has no primaryHue (fresh state or after reset-article), drop the inline --p…08e4c7a
-
feat(frontend): editor refresh (embed studio, comment popover, shiki, top bar, hooks, styles)
- New top bar + publish dialog + sync indicator + mobile TOC sidebar replace the previous floating actions and full sidebar stack - Add EmbedStudio chat panel wired to the backend embed agent (embed-tools + stream handler), with fullBleed iframe mode for banner rendering and double-buffered previews - Swap legacy comments sidebar for a floating CommentPopover anchored to the active thread - Shiki-based code block extension + scroll guard on top of TipTap v3; richer frontmatter settings (hue slider, template variant, SEO) and Editor footer - Shared hooks (useTheme, useEmbedChat, usePublishStatus) and a singleton MutationObserver so all components subscribe to theme changes from the same source - Reorganize CSS into scoped modules (_ui, _footer, _embed, _embed-studio, _hero, _mermaid, _toc, _form, _code, tokens, layout, publisher, print) and drop the dead postcss config - Add frontend vitest suite + tsconfig(+node) + vite-env typings + typed utils/types modules Made-with: Curs…76fc93a
-
refactor: remove MUI, unify publisher pipeline, add shared component registry
Phase 1 - Publisher pipeline: - Extract ~370 lines of inline CSS from html-renderer.ts into _publisher.css - Create shared/component-defs.ts as single source of truth for component definitions - Replace 6 regex blocks in postProcess() with linkedom DOM manipulation - Add GET /api/preview/:docName for testing renders without publishing - Add 12 snapshot tests for each postProcess transformation (46 tests total) Phase 2 - Remove MUI: - Replace all MUI components with native HTML elements + custom CSS - Create _ui.css with editor chrome styles using --ed-* CSS tokens - Create Tooltip.tsx using Floating UI (lightweight replacement) - Replace @mui/icons-material with lucide-react - Delete theme.ts, remove @mui/* and @emotion/* dependencies Phase 3 - Documentation: - Add docs/ARCHITECTURE.md covering CSS layers, HF Spaces constraints, shared registry, publisher pipeline, and test coverage Made-with: Cursord15d7f7