dsh-client-ui-mimir
v0.16.0
Published
Mimir research workbench for the web surface: a sidebar-footer toggle plus a frame-level overlay listing wiki projects, the paper outline, and the latexmk/tectonic compile/PDF preview, backed by the research Host Remote
Readme
Mimir Workbench (dsh-client-ui-mimir)
English | 中文
Mimir workbench plugin, browser half: a "Mimir" toggle contributed as the research entry (order 10) of the sidebar.footer.action strip, plus the frame-level workbench it opens as the research entry (order 10) of shell.overlay. Both seats are declared by other packages (ui-sidebar and ui-layout respectively), so both registrations go through slots.inject and wait on the declaration. The workbench is a wide fixed overlay (96vw × 95vh) — the overlay layer is click-through, so the workbench opts back into pointer events itself — with a left rail (eight view tabs plus the project picker at the bottom) and a content area rendering the active tab:
- the overview — the selected project's card with the five-stage pipeline progress, the stat chips (papers / experiments / figures / servers), the artifact list and timestamps, plus the data card: export the whole wiki as one dated JSON snapshot, or import one back through a summary-confirm flow (merge skips existing keys, never overwriting; replace wipes all six tables and therefore arms a red second confirm), with the per-table imported/skipped counts as the receipt;
- the paper editor — a collapsible clickable outline rail whose top-level sections drag-reorder via row grips (rewriting
main.tex's\sectionorder under an optimistic base-outline check), themain.texsource editor with zero-dependency LaTeX syntax highlighting, a synced line-number gutter and the autosave status pill, the compile controls with a severity-colored issue list whose entries jump the editor to the source line, the iframe PDF preview of/research/pdf/<project id>, and a bibliography panel over the project'sreferences.bib(entry list with delete, optimistic-concurrency saves with conflict reload, and a picker that appends checked library papers); the three panes resize through drag handles with the widths persisted across sessions, and the editor/preview panes each go fullscreen on one click or exit onEsc; - the papers library — the collected literature as an expandable-summary card grid with editable tags and per-project links, a tag/current-project filter bar, in-panel arXiv search with one-click import into the wiki, card delete, and one-click add-to-
references.bibper card; a toolbar button assembles the currently filtered papers (title, abstract, notes, citation key) into a related-work draft prompt and queues it to the current session's agent, the same session channel the compile issue list's "fix with AI" button uses — with no session selected, a toast says so instead; - the experiments tab — the run table with status pills, metric-comparison bar charts over shared numeric metrics as inline SVG, per-run expandable metrics, a linked-server badge per row with an inline relink dropdown, row delete, and
EXPERIMENT_LOG.mdrendered with the built-in restricted Markdown renderer (headings, bold/italic/inline code, code fences, lists, quotes, rules, tables, and links whose non-http(s) URLs are neutralized to plain text); - the figures grid — thumbnails of the paper directory's image files served through
/research/figure/<project id>?path=…, with a click-to-zoom lightbox, upload (the toolbar button, or drag-and-drop anywhere on the view: a dashed overlay shows while hovering and unsupported types are reported, not ignored), delete, and copy-LaTeX-reference card actions, plus a forced-rescan refresh; - the meetings tab — the group-meeting (组会) deck builder: a form with the deck title/presenter/date, four section switches (progress / experiments / figures / papers), a paper multi-select (empty = the top 12 by the project's AI relevance verdicts) and a figure multi-select (empty = every figure with a raster sibling); generate calls the host's deterministic renderer (no agent round-trip) and writes a 16:9 PPTX into the workspace's
meetings/<project id>directory, which the view lists below with file name, size and mtime, a download (the/research/meetingattachment route) and delete actions; - the servers board — remembered GPU boxes with a TCP reachability probe and a best-effort SSH
nvidia-smireadout (utilization/memory bars), tag chips on the cards and in the form with a tag filter bar above the grid, and add/edit/delete; - the ledger (growth record) — the transparent record of the research process: an archive-style timeline of decision-grade events for a chosen time window (7/30/90 days or all time) × project scope (all projects or the current one), newest first, each row an ISO microtext timestamp, a flat node (stamped brick-red when destructive), the action as a mono tag, the actor microtext, and a one-line payload summary; above the timeline, the one-click progress report generated for the same window (rendered as a printed sheet with serif headings and hairline section rules, with a dated Markdown download and a copy action).
The panel header carries a dark/light theme toggle and a 中/EN language toggle (both land on the host-persisted preferences), and the workbench answers keyboard shortcuts: 1–8 switch tabs, Esc closes the panel (a fullscreened pane exits first), and ⌘/Ctrl+Enter compiles in the paper view. Narrow windows degrade gracefully: below 900px the paper view collapses its outline rail and switches editor/preview to single-column tabs; below 700px the left rail becomes a top horizontal strip with scrollable navigation. Once the project list settles, the first project is auto-selected so the overview never opens blank.
One ResearchController per client runtime backs the workbench, over the generated research Remote namespace — 63 methods: project and paper (listProjects / getPaperOutline / getPaperSource / savePaperSource / reorderPaperSections / reorderPaperSubsections / compile / getCompileStatus), paper snapshots (listPaperSnapshots / getPaperSnapshot / revertPaperSnapshot), venue templates (listVenueTemplates / applyVenueTemplate / clearVenueTemplate — the built-in registry plus applying or clearing a target venue, which writes a TEMPLATE.md brief the agent reads when re-laying out the paper), Zotero (checkZotero / searchZotero / listZoteroCollections / importZoteroItem / exportZoteroCollectionToBib), literature (listPapers / searchArxiv / searchWeb / importPaper / removePaper / updatePaper / fetchPaperPdf), arXiv subscriptions (listArxivSubscriptions / saveArxivSubscription / deleteArxivSubscription / checkArxivSubscriptions — the papers view's keyword subscriptions with a new-paper badge and one-click import), bibliography (getBibliography / saveBibliography / importPapersToBib), experiments and artifacts (listExperiments / deleteExperiment / updateExperiment / saveExperiment / readArtifact), figures (listFigures / deleteFigure / renameFigure / updateFigure / convertFigure / saveFigure — uploads go through the /research/figure-upload route instead), group-meeting decks (generateMeetingDeck / listMeetingDecks / deleteMeetingDeck / getImageGenConfig / setImageGenConfig — the deterministic 16:9 PPTX renderer behind the meetings tab), servers and jobs (listServers / saveServer / deleteServer / checkServer / submitJob / listJobs / deleteJob), the growth record (listEvents / generateProgressReport / generateBrief / addJournalEntry — the event timeline, the one-click progress report, and the cognitive brief: the window's DDM-lite cognitive map plus the user's handwritten L2 journal), and wiki backup (exportWiki / importWiki / listBackups). The project list read is deferred to the first open rather than fired on mount, because the toggle mounts with the sidebar whether or not the panel is ever used; a failed load stays retryable, and a reconnect resyncs a warm view. The per-tab reads are lazy too: the library loads on the papers tab's first open, the experiment log on the experiments tab, and the figure scan on the figures tab; a ready same-project artifact or figure view skips its refetch unless forced. Outline, source, and experiment loads are superseded per selection, so a slow reply from a previously selected project never overwrites the current one. A successful wiki import re-fetches every loaded slice, so the panel reflects the new data without a reopen. Each project row carries the wiki record's optional paperDir; the controller forwards it as the dir argument of every paper call (and the workbench appends it as ?dir= to the PDF preview and figure URLs), so a project whose paper lives in another workspace subdirectory — set through the wiki_note tool's set_project action — edits, compiles, previews, and scans that directory instead of the default paper.
Edits autosave after an ~800 ms debounce through savePaperSource's optimistic concurrency (the mtime check and atomic write run inside the host's writer lock); a successful save of an untouched draft schedules an auto-compile after ~1.5 s. A compile requested while one is running is queued and fired when the in-flight run settles. When the host reports conflict — the agent landed a newer version the draft never saw — the draft is kept, editing freezes, and the panel offers a reload that snaps the editor back to the file's content. Error-list entries with a line number jump the editor's caret and viewport to that source line.
Panel open-state and the selected project live in one store handle shared by both registrations, so the toggle's pressed state and the panel's content can never diverge.
The /client exports are the plugin body (apply/inject), the injected face and props types, the store factory, and the controller/view types. The components stay internal.
Model Experience
None, as the panel is a pure view over the wiki domain and the compile artifacts; it never enters the append-only Session log, the model context, or telemetry.
KV Cache effect
None; no panel interaction touches the history tail.
Known Limitations and Deferred Work
- Compile status is host process memory — a host restart forgets the last outcome, and the panel then shows
idleuntil the next compile, even when a previously builtmain.pdfis still on disk. - One workspace, per-project paper directories — each project's paper lives in the record's
paperDirsubdirectory of the workspace (defaultpaper, the/paper-writeconvention); the project id keys the panel's bookkeeping and authorizes the PDF route, and every resolved path is confined inside the workspace. - Single-file editor — the LaTeX syntax highlighting is a zero-dependency overlay with no linting or multi-file awareness; only
main.texis editable,\input/\included files are not. - No live push — the panel polls nothing and subscribes to no host events; a compile started elsewhere (the
/paper-compilecommand or the tool) becomes visible on the next selection or compile, not immediately. An external edit is only discovered when the next autosave hits the mtime conflict. Wiki data changed elsewhere (thewiki_notetool, an import in another window) likewise repaints on the next load, not live.
