Fullscreen was broken for every render type, two root causes stacked:
- The overlay used position:fixed but rendered inside the message bubble,
whose ancestors (streaming animation transforms, chat scroll root) break
fixed positioning — inset-0 resolved against the bubble and the composer
stacked above the overlay. Render via createPortal(document.body).
- Content was fit to width only, so figures outgrew the viewport
vertically, and items-center + overflow made the top edge unreachable.
Now: m-auto centering (small content centers, oversized content scrolls
from its start edge); svg (ours + mermaid) clamps max-height and
letterboxes via the default preserveAspectRatio; Chart.js caps the
wrapper WIDTH so its own 2:1 aspect scaling lands within the viewport
(CSS-clamping the canvas would squish the bitmap). The chart wrapper's
inline maxHeight moved to .dt-chart-wrap so fullscreen can override it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Finishes the visualize overhaul (517c90b backend + b499ba7 frontend).
- Book figure/interactive now share the chat path: deterministic local
validate_visualization, one targeted repair on failure (figure), and
GenerationFailure on residual invalidity so the book engine retries
instead of baking a broken figure/placeholder into the book.
- Delete the now-dead open-ended LLM review: pipeline.run_review and the
review prompts (review_agent.yaml keeps only repair_system/
repair_user_template). ReviewAgent's process() IS the repair pass now
(BaseAgent.process is abstract, so repair was renamed, not stubbed).
- Prompts: drop the 'split into an overview plus a detail figure' wording
that contradicted the single-<svg> policy; add a text vertical-centering
rule (y = box center, host centers via CSS) and a visual_genre fallback
line. en + zh kept in sync.
- svg-theme.css: dominant-baseline: central on .dt-svg-root text — the
host guarantees vertical centering so the model never has to emit (or
misspell) dominant-baseline itself.
- tests: replace the stale FakeReview/run_review fake with a valid-svg
no-repair path in test_capabilities_runtime.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- SvgRenderer: <img> data-URI -> sanitized inline DOM. Dependency-free
sanitizeSvg strips script/foreignObject/on*/js-urls and scopes element ids +
url()/href/aria refs so multiple inlined svgs don't collide. Multi-<svg>
content is split into independent figures.
- svg-theme.css: themed class system (t/ts/th, box/node/arr, c-* 9-ramp)
following light/dark via CSS vars and the app Geist font; svg sized width:100%
by viewBox to avoid the 300x150 inline collapse.
- HtmlRenderer: iframe height auto-fit + receives the widget's sendPrompt.
- iframe-html.ts: inject the sendPrompt bridge + a ResizeObserver height report.
Frontend visualize only — the chat page.tsx composer-prefill listener is left in
the working tree alongside the unrelated chat changes there.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Capability infrastructure:
- New capabilities/_shared.emit_capability_result helper fills the
result envelope (label, summary, payload, render hints, UsageTracker
totals) consistently across modes.
- StatusI18n loads capability status copy from
capabilities/prompts/{en,zh}/<name>.yaml; legacy main.yaml strings
removed.
- New capabilities_settings router + service-config module power the
/settings/capabilities admin page (live capability list, defaults,
per-capability overrides).
Visualize + Animator merge:
- Visualize's AnalysisAgent now picks one of six render_types:
svg / chartjs / mermaid / html (text pipeline) or manim_video /
manim_image (Manim subprocess). The result envelope carries
render_type so the frontend delegates to the right viewer.
- math_animator capability is folded behind Visualize; the standalone
MathAnimatorConfigPanel.tsx is removed. The Animator sidebar entry
is gone, but Manim outputs and existing records remain unaffected.
Settings UI:
- /settings page split into appearance / capabilities / embedding /
llm / mcp / memory / search / status / tools tabs with a shared
layout and items index.
- New /settings/tools page lists chat-mountable tools and surfaces
availability (e.g. gh for github_query) via a new tools router.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extract `ComposerInput` component to isolate frequent keystroke renders.
Refactor `ChatComposer` to use `hasContent` flag instead of full `input` state.
Apply `React.memo` to heavy config panels (Quiz, Math, Research, Visualize).
Stabilize parent callbacks in `ChatPage` using `useCallback`.
Fix residual syntax errors and missing `canSend` definition in composer.
Address HKUDS/DeepTutor#351 by implementing deep state colocation.
Resolved conflicts in:
- deeptutor/agents/notebook/summarize_agent.py
Kept the YAML-driven record_hints lookup from dev (covers chat,
co_writer, guided_learning, default), instead of the inline
dict from guide2.0 which only had chat + co_writer.
- deeptutor/capabilities/visualize.py
Kept dev's load_answer_now_prompts(...) path so the answer-now
fast path stays prompt-externalised under
deeptutor/agents/visualize/prompts/{en,zh}/answer_now.yaml.
- deeptutor/services/prompt/manager.py
Merged the MODULES list: dropped 'guide' (deleted by guide2.0),
added 'book' from guide2.0, and kept dev's 'notebook',
'visualize', 'chat' modules.
Made-with: Cursor
- Move inline LLM prompts out of capabilities/agents into versioned
prompt YAMLs under each agent's prompts/{en,zh}/:
- notebook: analysis_agent, summarize_agent
- question/research/solve/visualize: answer_now
- Slim down capability modules (_answer_now, deep_question,
deep_research, deep_solve, visualize) to load prompts via the
prompt manager instead of hard-coding strings
- Update services/prompt/manager.py to support the new prompt paths
- Refresh web config panels (quiz, research, visualize, math-animator)
and shared types to align with the new capability options
- Update Mermaid, ChatMessages, TracePanels and settings page,
plus en/zh locales for the new copy
Made-with: Cursor
- Promote "Answer now" to a universal escape hatch via answer_now_context;
orchestrator re-routes any capability to chat._stage_answer_now.
- Co-Writer: draggable split + persistent ratio + line-anchored
bidirectional scroll sync using a hidden mirror for wrap-aware editor y.
- SaveToNotebookModal: optional message-selection mode with quick presets;
rebuild transcript / userQuery from the selected subset.
- Adopt the real notebook API (/api/v1/notebook/*) across Knowledge tab,
guide notebook picker, and save-to-notebook flow; new typed helpers in
web/lib/notebook-api.ts (listNotebooks/getNotebook/createNotebook/...).
- Extract CollapsibleConfigSection; unify Quiz / Math Animator / Visualize
/ Deep Research panels behind one collapsed-summary header.
- Replace streaming spinner with a dedicated Stop button; persistent
composer header; mask-gradient on messages container.
- TutorBotManager: public load/save/merge API; atomic write via temp +
Path.replace; merge_bot_config with explicit-clear semantics; new
tests/services/tutorbot/test_manager_config.py.
- MarkdownRenderer: trackSourceLines passes data-source-line through;
RichCodeBlock skips Prism for unlabeled/plaintext fences; mermaid
detection includes flow/seq/sequence editor.md fences.
- UI/theme: deeper foregrounds + warmer borders for light/Snow themes;
/guide migrated off hardcoded slate/indigo to design tokens;
HistorySessionPicker themed and timestamp-seconds bug fixed.
- Filter system messages out of UnifiedChatContext.hydrateMessages and
ChatMessageList so backend grounding context never renders as a bubble.
- Bug fixes (already merged earlier in dev):
* tutorbot config wipe on restart (#332)
* selective_access_log middleware unpack crash (#334/#335)
* 15 npm security vulnerabilities — jspdf/next/mermaid (#330)
- Drive-by: remove "// README" typo from .env.example_CN.
- Add v1.1.1 release notes and update README.
Made-with: Cursor