Commit History
-
fix(highlight): auto-detect language for code blocks without explicit lang
Code blocks authored without a language rendered as plain text in both the editor and the published output (Shiki falls back to "text"). Add a shared lowlight-based detector and use it as a fallback in the editor decorations and the publish transformer, so language-less blocks get highlighted identically everywhere - including in already-written articles. Co-authored-by: Cursor <cursoragent@cursor.com>700adac
-
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 -
fix(editor): use explicit class for multi-count avatar z-index
Replace the :has() selector with an explicit --multi modifier class for reliable cross-browser support of the overlapping collaborator avatars. Co-authored-by: Cursor <cursoragent@cursor.com>6b2bf82
-
feat(editor): dedupe connected collaborators by identity
The presence avatars were keyed by Yjs awareness clientId, so the same person showed up once per connection: every extra tab/device, and every lingering pre-timeout socket left behind by a reconnect (amplified by the refocus re-sync), rendered the same circle again. Collapse awareness clients sharing an identity (HF username, falling back to avatar URL then clientId) into a single avatar, with a "xN" badge + tooltip when a person has multiple live sessions. Co-authored-by: Cursor <cursoragent@cursor.com>a0b96b1 -
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 -
fix(editor): preview the banner correctly in the Embed Studio
The studio built every preview srcdoc without fullBleed and let the iframe fill the whole preview pane, so the banner (an edge-to-edge 5:2 embed) was rendered like a height-reporting chart and looked nothing like the hero. When editing banner.html, build the srcdoc with `fullBleed: true` and render it inside a centered 5:2 stage (matching .hero-banner dimensions), so the studio preview is a true WYSIWYG of the published header. Regular charts are unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>3d7f9ad -
feat(editor): Embed Studio button in the top bar
Adds a chart button to the TopBar that opens the Embed Studio. Smart entry point: when charts already exist it opens the studio on one of them (prefers a real chart over the always-present banner) without mutating the document; only when there is no chart does it fall back to inserting a fresh one, mirroring the slash menu's "New Chart" flow. Both paths route through the existing `open-embed-studio` event so session/key handling stays in one place. Co-authored-by: Cursor <cursoragent@cursor.com>2dfb335 -
feat(editor): drag-and-drop reordering for authors and affiliations
Authors and affiliations in the hero meta header can now be reordered by dragging. Reordering affiliations remaps every author's 1-based affiliation indices in the same Yjs transaction, so superscripts keep pointing at the right institution. Drop affordances (grab cursor + primary-color edge marker) live in the editor-only _hero-editable.css and never leak into the published HTML. Co-authored-by: Cursor <cursoragent@cursor.com>a2d6d01
-
test(editor): extract refocus re-sync into a unit-tested module
Pull the tab-refocus liveness/lock logic out of the Editor effect into a pure createRefocusSync() so it can be exercised without a browser. Add vitest coverage for the four cases it must distinguish: healthy (no lock), disconnected (lock + unlock on synced), dead readyState, half-open socket (lock after the post-forceSync probe), and the offline grace release. The effect now only wires the visibilitychange trigger. Co-authored-by: Cursor <cursoragent@cursor.com>45d6656 -
feat(editor): local-first persistence + robust refocus re-sync
Prevents a stale never-closed tab from clobbering a collaborator's newer content (the core data-loss incident): - Mesh y-indexeddb onto the shared Y.Doc so edits survive refresh / offline, and a client can re-sync its durable local copy back up if the server ever loses or resurrects a stale document. - On tab refocus, force a sync round-trip and hold the editor read-only until it completes, so the user can't type onto a visibly-stale buffer. Detect dead sockets via websocket status, readyState and last-message timestamp (incl. half-open sockets via a post-forceSync probe). Always release after a 4s grace window so offline editing is never trapped (local-first). Co-authored-by: Cursor <cursoragent@cursor.com>fe9b487
-
feat(hero): persistent Edit + Delete buttons on the banner
A filled banner now exposes two buttons in a top-right action cluster: - Edit (PencilLine icon) - opens the Embed Studio on the banner key so authors can iterate on the HTML via the AI agent, just like any other htmlEmbed. Works whether the banner is an image upload, a chart placeholder, or a custom fragment. - Remove (Trash2 icon, danger hover) - same behavior as before. Both buttons are constantly visible instead of fading in on hover: the banner is a first-class authoring surface and a hidden mutation affordance was confusing once you'd seeded the placeholder content. CSS shifts from .hero-banner-remove (single button, opacity-gated) to .hero-banner-actions (cluster) + .hero-banner-action (per-button styling, always opacity:1). Danger variant tints the Remove button red on hover/focus so the destructive action is still distinguishable from the Edit one. Co-authored-by: Cursor <cursoragent@cursor.com>55f5851 -
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(editor): Iframe embed component for remote URLs
Adds a new atomic component `Iframe` (slash menu icon 🔗) that embeds an arbitrary remote URL via `<iframe src=...>` instead of inlining HTML from the embed store. Use case: integrating widget Spaces (e.g. carbon- tokenization-widgets) without having to download and adapt their HTML to the strict create-html-embed conventions. - Shared component def (atomic, fields: src, title, desc, height, wide) - Custom NodeView with live iframe preview, Settings + Reload buttons, auto-resize when the remote page emits postMessage({type:"embedResize"}) - Publisher transformer emits <figure class="html-embed"> reusing the existing iframe/figcaption markup so styling and figure numbering carry over for free - llms.txt renderer surfaces the URL as a Markdown link - 3 publisher tests covering happy path, empty-src drop, and wide flag Co-authored-by: Cursor <cursoragent@cursor.com>0c69852
-
fix(toc): scope the hide-on-mobile rule to the desktop TOC only
The previous rule hid every `.table-of-contents` on narrow viewports, which also matched the React component re-rendered inside `.toc-mobile-sidebar` (the hamburger drawer). Result: the drawer opened to an empty body. Scope the hide to `.content-grid .table-of-contents` so the drawer copy of the same component stays visible. Co-authored-by: Cursor <cursoragent@cursor.com>bf08f85 -
feat(editor): code block button in the bubble toolbar
Code block was reachable only via the slash menu (`/code`). The bubble toolbar already exposes Bold / Italic / Strike / inline Code / Heading / Quote / Link, so a code block button fits naturally alongside Quote (the other block-level toggle in that row). - Uses lucide `Code2` (chevrons with a slash) to keep it visually distinct from the existing inline `Code` icon next to it. - Active state mirrors the slash-menu behaviour: lights up when the caret is inside an existing `codeBlock` node, so a second click toggles back to a regular paragraph. - Placed between Quote and Link to mirror the slash menu's own order (Quote -> Code block -> Divider). Co-authored-by: Cursor <cursoragent@cursor.com>add3959 -
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(editor): show connected collaborators in the top bar
The collab cursors already render inline next to each peer's selection, but if no one's actively editing right now you have no way to see who else is in the room. Surface that in the top bar as an overlapping row of small avatars (24px circles, -6px overlap, max 4 visible + "+N" badge for the tail), placed just before the SyncIndicator. Data source: the same Y.js awareness states that CollaborationC ursorV3 already populates with \`{ name, color, avatarUrl }\` for every client. We listen to awareness "change" events and re-derive the list on each tick, excluding our own clientID so the user doesn't show up to themselves (they already see their own chip on the far right). Implementation notes: - Border color of each avatar mirrors the user's collab color (same hue as their cursor caret in the doc) so it's obvious at a glance which avatar maps to which inline cursor. - Fallback to a colored initial when avatarUrl is missing (Anonymous sessions before HF OAuth resolves). - Sort by…aa09c01 -
fix(editor): footer credit links to the editor Space too
The editor's own footer (EditorFooter.tsx) still pointed at the legacy Astro-only static template. Mirror the publisher-side fix and link to the editor Space instead, so authors see the same canonical entry point whether they're editing or reading the published page. Co-authored-by: Cursor <cursoragent@cursor.com>2bed071 -
fix(hero): live-commit on every keystroke, not only on blur
EditableText (the inline text field used for the title, subtitle, description and link labels in the hero) used to maintain a local React draft and only push the value to Yjs on blur or Enter. Net effect from the user's POV: the sync indicator stayed on "Saved" while typing, the doc didn't actually update until focus left the field, and on a slow tab-out or a browser crash mid-edit the work was lost. Felt unsaved. Switch to a 300ms debounce model: - Every onChange schedules a commit. If the user keeps typing, the timer resets - so we still get one Yjs update per "pause" instead of one per keypress. - onBlur and Enter flush immediately (no laggy "wait for the debounce" feel when committing the field by leaving it). - Escape cancels the pending commit and reverts the on-screen draft to the last server-confirmed value. Note that anything already committed during typing is still in the doc - the user gets it back with Yjs undo (Ctrl+Z), same as Notion / Linear. - las…82e43b6 -
fix(editor): SyncIndicator now reflects hero/settings/citation edits
The "Saving..." / "Saved" badge in the topbar used to listen only to TipTap's editor.on('update') event. That event fires solely for prosemirror document changes - i.e. when the article BODY is edited. The hero (title/subtitle/authors/links/...), the per-article settings, citations, embeds and the comment store all live in sibling Y.Maps on the same Yjs document. Edits there don't round-trip through TipTap, so they never triggered the indicator. Net effect for users: editing the hero felt like a no-op - no "Saving..." feedback - and the natural conclusion was "this isn't being saved", even though the backend's Hocuspocus onChange handler was happily persisting the full ydoc on every Yjs update. Subscribe one layer lower, on ydoc.on('update', ...). That callback fires for any Y.Map / Y.Array / Y.XmlFragment change in the document, which exactly mirrors what the backend persists. The indicator now flashes "Saving..." for every kind of edit and settles back to "Saved" once the write deb…adb1aa1 -
feat(auth): sign-out button in the editor topbar
Wraps the user chip in the topbar with a dropdown that exposes a "Sign out" action. Matches the visual + interaction pattern of the adjacent "More actions" menu so the two feel like a coherent toolbar element rather than a one-off. Backend (routes/auth.ts + auth.ts): - New POST /api/auth/logout (with a GET alias for ops/debug). handleOAuthLogout clears the hf_access_token cookie, mirroring every attribute the original res.cookie(...) used in handleOAuthCallback - browsers only delete a cookie if the new "expired" Set-Cookie matches path/secure/sameSite, otherwise we end up shipping two cookies and the session sticks. - POST is the canonical method so the call can't be hijacked by a cross-site <img>/<form> request; GET stays available for curl debugging and incident response. Frontend (TopBar.tsx): - Chip becomes a <button> with aria-haspopup="menu" that toggles an account menu. Color/avatar/name unchanged - same visual. - Dedicated state + ref (accountMenu…d10f68e -
fix(editor): SyncIndicator was stuck on "Disconnected" forever
The <Editor> creates the HocuspocusProvider lazily and assigns it to providerRef.current AFTER the surrounding components have mounted. <SyncIndicator> was wired with \`useEffect(..., [providerRef])\` and early-returned when providerRef.current was null. Because a ref doesn't trigger re-renders, the effect never re-ran once the provider arrived, so no listeners were attached and the status stayed "disconnected" regardless of the actual WebSocket state. The bug was always latent but became visible now that org-owned private Spaces actually get a working WS connection - the auth fix in the previous commit just exposed it. Replace the dependency-only effect with a small polling bootstrap: - Poll providerRef.current every 100ms until it lands. - Once we have the provider, attach connect/disconnect/synced listeners and seed the initial status from configuration.websocketProvider.status. - Add a 1s reconciliation interval that re-reads websocketProvider.status while attached. Some Ho…50f7a20 -
feat(publisher): editor pill shows who you're signed in as
Upgrade the editor quick-link from a bare pencil icon to a proper pill that contextualises the action: ┌──────────────────────────────────────────────────────┐ │ [avatar] Signed in as @tfrere [✎ Edit article] │ └──────────────────────────────────────────────────────┘ The visitor sees who they're authenticated as before clicking, which makes the "would I be writing to the real file?" question self-answering. Useful when multiple HF accounts share the same browser session, or when a collaborator wants to confirm they're not editing on someone else's behalf. Implementation: - Render placeholder content (\"@you\" + empty <img>) so the layout doesn't shift when /api/auth/status comes back. The pill is still \`hidden\` by default - no flash for anonymous visitors. - Inline script fills the <img>.src (preferring user.avatarUrl, falling back to /api/users/<name>/avatar) and the @handle, then drops the \`hidden\` attribute. - New \`.edit-pill\` styles: rounded pill, pa…2b90d0d -
feat(publisher): editor quick-link for signed-in editors
The published article and the editor share the same Space, but a visitor who already has edit rights had no way to jump from one to the other without retyping \`/editor\` in the URL bar. Add a small pencil icon top-right, mirroring the existing theme toggle on the top-left, that links to /editor. Visibility: - Hidden by default (\`<a id="edit-link" ... hidden>\`) so non- editors / anonymous visitors never see a flash. - An inline script probes \`/api/auth/status\` on load and removes the \`hidden\` attribute when \`canEdit\` is true. Fetch failures (offline preview, exported HTML opened from disk, etc.) are silently swallowed - the button just stays hidden. - Hidden under 1100px (same breakpoint as the theme toggle) so mobile / tablet layouts aren't cluttered. Styling: matches the theme toggle (40px circle, page-bg fill, 1px border, soft shadow) so the page stays balanced visually. \`mix(--primary-color)\` tint on hover hints at the destination. Snapshot updated to reflect…44626d0 -
feat(editor): WYSIWYG NodeView for HfUser cards
The HfUser block was rendering as the generic AtomicView - a dashed placeholder card with three labelled inputs - which looked nothing like the actual upstream component (avatar + display name + @handle). Authors couldn't tell what the published page would look like without a round-trip through publish. Replace it with a dedicated NodeView that reproduces the exact DOM of `app/src/components/HfUser.astro` in the editor: .hf-user └─ .hf-user__left ├─ .hf-user__avatar (img or "?" placeholder when empty) └─ .hf-user__text ├─ .hf-user__name (display name) └─ .hf-user__row └─ .hf-user__username (@handle) Inline editor: - Revealed when the node is selected, or when `username` is still empty right after insertion (prompts the author to fill at least the handle). - Three rows: Username / Display name / URL. URL placeholder switches to `https://huggingface.co/<username>` once a handle is known, so the user can see they don't need to…7814104 -
feat(embed-studio): clickable chart list to switch files
The sidebar already lists every chart in the doc but only the current one was highlighted - the others were inert <li>s. Make non-current entries clickable so the user can jump between charts without going back to the article and reopening another embed. - FilesSidebar: optional onSelectChart prop. Non-current items render as a <button class="es-files__item-main"> (same look as the clickable data files), the current item stays a plain <li> with the "editing" badge. - EmbedStudio: forwards onSelectChart to the sidebar. - App: rotates embedStudioSession when switching, so the studio remounts and useEmbedChat's mount-only loadMessages picks up the chat history persisted for the newly-selected file. - CSS: existing .es-files__item--data { padding: 0 } pattern extended via :has() to any .es-files__item that contains a button child, so the <li> padding doesn't stack with the button's own padding. Co-authored-by: Cursor <cursoragent@cursor.com>79008fb -
fix(embed-studio): contextual empty state and input placeholder
The chat panel always said "Describe the chart you want to create" even when a chart was already rendered in the preview pane next to it - confusing because the obvious next action is to ask for tweaks, not to recreate from scratch. Branch the empty state and the textarea placeholder on three situations: - no chart yet (scratch): "Describe the chart you want to create" + the original example prompt - existing chart: "Ask for changes to the chart" + a tweak example - banner mode: phrase both as "banner" instead of "chart" so the hint matches the banner system prompt's mood-setter intent Co-authored-by: Cursor <cursoragent@cursor.com>56a91d6 -
fix(embed): SVG text now follows the iframe theme
Three stacked bugs were keeping the chart text black in dark mode: 1. EmbedStudio mounted both preview iframes with sandbox="allow-scripts" only (no allow-same-origin). The bootstrap script couldn't reach window.parent.document, so the cascade fell through localStorage to matchMedia(prefers-color-scheme) - which returns the OS preference, not the app theme. Result: the iframe could land on a different theme than the article. Aligned the sandbox with HtmlEmbedView ("allow-scripts allow-same-origin"). 2. The THEME_BOOTSTRAP in shared/embed-doc.ts always overwrote the srcdoc-provided data-theme attribute, even when every detection path failed. Honour the existing data-theme before falling back to matchMedia so an explicit isDark from buildEmbedSrcdoc wins. 3. SVG text/line/path don't inherit CSS color the way HTML elements do - their default fill/stroke is "black", not "currentColor". Charts that scoped colours via `body { color: var(--text-color) }` …be7d6fa -
feat(embed-studio): make agent-generated charts theme-aware
The iframe already supports live light/dark swap via CSS variables and a postMessage(setTheme) hot-swap, but the LLM kept generating charts that hardcode colours into SVG attributes (fill="#333", stroke="black", ...). Those values can't be overridden by the parent's data-theme attribute, so the chart looked correct on whatever theme the model guessed and broken on the other one. Two complementary fixes: 1. Forward the current theme (light/dark) from EmbedStudio through useEmbedChat into the request context, and surface it in the system prompt as a "Current theme" section. The model now knows which background it's painting against and can self-correct. 2. Rewrite the "Colors & theming" section of the embed system prompt with a concrete CSS pattern (scoped .d3-* rules driving fill/stroke via var(--text-color), --axis-color, --grid-color, ...) and an explicit ban on hardcoded SVG colour attributes. Add a hint about window.__chartRerender for JS-driven palettes. No…27abbe5
-
fix(publish-dialog): show Space URL instead of /published/<doc> path
The success state used to display `Live at /published/default` and link to `/published/default/index.html`, surfacing an implementation detail of the publisher pipeline (used internally for PDF rendering and og:image) rather than the canonical URL readers actually visit. When a published article exists, the backend serves it at the Space root (`app.get("*")` in `create-app.ts`). Switch the modal to surface `window.location.origin` instead, both for the displayed URL and the "View published article" link target. Made-with: Cursor8d2864f -
fix(publisher): render HF user card via dedicated transformer
The hfUser atomic node was serialized to an empty `<div data-component="hfUser">` placeholder with no transformer to turn it into the actual profile card, so it rendered as nothing in published articles. Add `hfUserTransformer` mirroring the upstream `HfUser.astro` (avatar + name + @handle), register it in the pipeline, ship the matching `.hf-user` styles in `_publisher.css`, and cover the three cases (full attrs, fallback to username, missing username) with unit tests. Made-with: Cursorf621e1d -
chore(release): prep v0.1.0 with LICENSE, env example and agent undo test
- Add LICENSE (CC-BY 4.0) aligned with the upstream research-article-template - Complete backend/.env.example to cover every env var consumed by the backend (PORT, DATA_DIR, ENABLE_PDF, OAUTH_*, SPACE_ID/SPACE_HOST, HF_DATASET_ID, HF_TOKEN, OPENROUTER_API_KEY/MODEL, PUBLISH_BASE_URL) - Extract createAgentBatch() helper from useAgentChat into frontend/src/editor/agent-undo-batch.ts (pure module, no React) and add the P0 5.3.1 test from docs/TESTS.md: 3 chained agent edits (replaceSelection + applyDiff + updateFrontmatter style) revert with a single Cmd+Z, while the previous user edit stays untouched - Refresh README known-debt list to reflect the new coverage Made-with: Cursord63dcfe
-
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(editor): embed studio with data files and agent-aware editing
Editor - New Embed Studio panel for AI-assisted chart creation: upload and manage data files (3MB limit), browse them in a dedicated viewer, and iterate on the generated HTML via a chat wired to a dedicated embed agent (embed-chat + embed-system-prompt + embed-tools + tiptap-catalog) that can create, rename and edit embeds. - Tiptap extensions for agent-driven editing: - agent-focus: Yjs-awareness ranges so every peer sees where another user's AI is working ("<Name> agent" label). - agent-highlight: local PM decoration to mark the paragraph the agent is currently rewriting. - agent-rewrite: typewriter-animated range rewrite command used by the rephrase flow. - Rephrase flow now goes through agent-rewrite (typewriter) instead of a plain replace; bold demonstration moved to the floating bubble toolbar above a selection. - SlashMenu reorganised with grouping and dev-only items dropped. - New components: DataFileViewer, FilesSidebar, UploadZone. - …8fc8501
-
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 -
feat(demo): add trio Playwright orchestration + seed embeds for the pitch video
- backend/demo/trio.ts drives 3 real Chromium sessions (Alice/Bob/Carol) collaborating on a fresh document in under 30s for the demo reel, with human-like typing and kill-leftovers hygiene on every run - Centralize the hand-crafted banner HTML and demo-specific embeds (confusion matrix, memory bar) so the script stays deterministic for recordings - Expose a `load-demo` entrypoint used by the dev-only script to hydrate the editor in one shot Made-with: Cursorf5f4567
-
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 -
fix: TOC mobile toggle not visible due to CSS cascade order
The _toc.css component file (loaded last) set display:none on .toc-mobile-toggle/backdrop/sidebar by default, overriding the @media responsive rules in _layout.css (loaded earlier). Move the responsive display overrides into _toc.css so they appear after the default rules and win in the cascade when the media query matches. This fixes the TOC being completely invisible on viewports < 1100px (including HF Spaces iframe at ~968px). Made-with: Cursorc68749f -
fix: enable PDF generation by adding playwright dependency
- Add playwright as a production dependency in backend - Set PLAYWRIGHT_BROWSERS_PATH in Dockerfile for reliable browser discovery - Remove silent fallback on playwright install to surface errors - Remove non-functional PDF button from editor hero (only relevant in published output) - Respect showPdf frontmatter flag in publisher pipeline Made-with: Cursor8d245e0 -
fix: generate proper footnotes section in published HTML
- Collect all inline footnotes during postProcess and replace with numbered superscript links ([1], [2], etc.) - Append a <section class="footnotes"> with ordered list at the bottom - Footer JS automatically moves this section into the footer area - Add footnote-ref styling (primary color, hover underline) - Make extractBibliographyHtml recursive to find bibliography in nested nodes - Add two demo footnotes to the default article content Made-with: Cursor77b813e -
feat: align component CSS with research-article-template
- Note: left border accent style with color-mix variants (info/success/danger) - QuoteBlock: decorative open-quote mark, large text, author/source footer - Accordion: template-matching border, bg, chevron, open state highlight - Sidenote: muted text, generous padding (matches Sidenote.astro) - Reference: proper spacing and caption styling - Stack: responsive breakpoints matching template (768/1100px) - Tables: zebra stripes, template header bg, vertical dividers - Wide/fullWidth: proper overflow layout in editor - Add PDF download button to hero meta section (using showPdf flag) - Update publisher HTML styles for all components to match template Made-with: Cursor9f7fae9 -
feat: show real HF username and avatar for connected users
- Fetch /api/auth/status on mount to get HF user info (name, avatar) - Replace random names with actual HF fullName and profile picture - Update collaboration cursor to display avatar next to username - Update top bar Chip with avatar component - Sync awareness when user data arrives after initial render - Use deterministic color from username hash instead of random Made-with: Cursor15dff0c -
fix: prevent seed race condition with Y.Map guard and defensive checks
- Add Y.Map("meta").seeded flag to prevent multiple clients from seeding the same empty doc concurrently (Yjs merge duplication) - Set seededRef early to prevent re-entry - Add authors array length check in seedFrontmatter as extra guard Made-with: Cursorce5a372 -
fix: XSS escaping, DRY utils, agent undo batch, graceful shutdown
- Escape meta.licence in published HTML to prevent XSS - Extract shared sanitizeName/docPath/DATA_DIR into utils.ts (DRY) - Disable WS debug logging in production - Fix startup log message (was /collab/:doc, now /collab) - Remove unused NextFunction import in auth.ts - Remove duplicate JSDoc in publisher/index.ts - Add timeout to graceful shutdown (SIGTERM/SIGINT) - Fix agent undo batch: close batch on stream finish (onFinish) - Fix replaceSelection: return error when no text selected Made-with: Cursore371833 -
fix: prevent Y.Doc content duplication from seed race condition
The editor was seeding default content on an 800ms timer that could fire before the Hocuspocus sync completed. When the server had existing content from the HF dataset, Yjs would merge both copies (different client IDs), causing all content, authors, and affiliations to appear multiple times. Fix: only seed after the "synced" event, and check the Y.Doc fragment directly instead of ProseMirror state. Also adds /api/admin/reset-document endpoint to clear corrupted Y.Doc state. Made-with: Cursor1c21ac9 -
fix: align published article with template design
Theme toggle: - Replace emoji button with SVG sun/moon icons from ThemeToggle.astro - Fix id mismatch (class="theme-toggle" -> id="theme-toggle") - Add spin animation and system theme detection Hero: - Add .hero-title class to h1 so clamp font-size styles apply DOM structure: - Change <article> to <main> in content-grid to match template selectors (.content-grid main) used across _base.css, _layout.css, _table.css for typography, figures, references Component CSS: - Add styles for note, quoteBlock, sidenote, stack, reference, wide, fullWidth components (div[data-component="..."]) Code highlighting: - Load highlight.js runtime + call hljs.highlightAll() for syntax coloring in published code blocks Performance: - Debounce CommentsSidebar position updates and TOC heading extraction Made-with: Cursor0094189 -
fix: double TOC in published view and broken collapsible sections
- Add missing mobile TOC styles (display:none defaults, sidebar panel, backdrop, toggle button) extracted from TableOfContents.astro - Add overflow:hidden + transition for toc-collapsible sub-sections Made-with: Cursor9ebbb3c -
feat: adopt template CSS architecture, hero/TOC/color alignment
- Copy template foundation CSS (_variables, _reset, _base, _layout, _print) and component CSS (_code, _table, _tag, _card, _mermaid) - Extract hero styles from HeroArticle.astro into shared _hero.css - Extract TOC styles from TableOfContents.astro into shared _toc.css - Create _editor-tokens.css for editor-specific design tokens - Scope _reset.css and _base.css global styles to article area to avoid overriding MUI portals (Dialog, Menu, Tooltip) - Exclude _button.css and _form.css from editor (bare element selectors conflict with MUI components) - Align FrontmatterHero class names with template (.hero, .meta, .meta-container-cell, .authors, .affiliations) - Align publisher HTML renderer class names accordingly - Fix TOC sticky positioning (align-self:stretch + sticky wrapper) - Add hue-based color picker (OKLCH slider like template ColorPicker) synced via Yjs settings, driving both MUI theme and CSS variables - Align editor link styles with template (--primary-color) - Add Po…9b7d64e -
fix: rename to Research Article Template Editor
Made-with: Cursor1e2f7dc