Skip to content

fix(chat): prevent false clarification on follow-ups + docs improvements#528

Merged
Movm merged 8 commits intomasterfrom
test-branch
Mar 7, 2026
Merged

fix(chat): prevent false clarification on follow-ups + docs improvements#528
Movm merged 8 commits intomasterfrom
test-branch

Conversation

@Movm
Copy link
Copy Markdown
Collaborator

@Movm Movm commented Mar 7, 2026

Summary

  • fix(chat): Restructure classifier prompt Step 8 so needsClarification: false is the default. Clarification is now the explicit exception (AUSNAHME), only triggered when ALL conditions are met: no conversation history, no topic, can't answer without one. Fixes follow-up messages like "jetzt darauf basierend einen tweet" falsely triggering clarification buttons.
  • feat(docs): Add Wolke save button with folder browser and fix document export
  • feat(docs): Add Checkliste and Einladung document templates
  • fix(docs): Gate document query on auth loading state
  • fix: Resolve CodeQL ReDoS vulnerability in blockNoteXmlToHtml.ts by splitting regex
  • fix(mobile): Resolve all 13 React Compiler lint errors (refs during render, Reanimated/expo-video immutability, useCallback dep mismatches, setState-in-effect)
  • docs: Add WSL RAM constraint note for typechecks in CLAUDE.md

Test plan

  • Generate a press release, then say "jetzt darauf basierend einen tweet" → should produce tweet directly (no clarification)
  • Fresh conversation, say "Erstelle einen Post" → should still trigger clarification (no history, no topic)
  • Fresh conversation, say "Erstelle einen Post über Klimaschutz" → should NOT trigger clarification (topic is explicit)
  • Verify docs templates (Checkliste, Einladung) render correctly
  • Verify Wolke save button and folder browser work
  • CI passes (lint + CodeQL)

Movm added 5 commits March 6, 2026 18:18
EditorPage fired the document fetch before auth status resolved,
causing authenticated users to hit the public endpoint (which 404s
for private documents). Wait for isAuthLoading to be false before
enabling the query.
Add two new templates to the document template picker:
- Checkliste: tick list using BlockNote checkListItem blocks
- Einladung: formal meeting invitation for Ortsvorstand sessions
…t export

Add a cloud save button to the document editor that lets users save
documents as DOCX to their Nextcloud (Wolke) share links. Includes a
folder browser modal for choosing the target directory.

Also extracts blockNoteXmlToHtml to a shared hocuspocus module and
wires it into the export controller for proper HTML/Markdown/text export.
Restructure classifier Step 8 prompt so needsClarification: false is
the default. Clarification is now the explicit AUSNAHME, triggered only
when ALL conditions are met: no conversation history, no recognizable
topic, and no way to answer without one.

When conversation history exists, the classifier always sets
needsClarification: false and trusts the downstream respondNode which
has access to the full untruncated conversation.
Comment thread services/hocuspocus/src/blockNoteXmlToHtml.ts Fixed
- Fix CodeQL polynomial regex (ReDoS) in blockNoteXmlToHtml.ts by
  splitting open/close tag regexes to remove ambiguous `\/?` alternation
- Fix React Compiler lint errors in mobile app:
  - Move ref sync to useEffect in useMobileChatRuntime (react-hooks/refs)
  - Use null-check pattern for init-once ref in MobileChatProvider
  - Suppress Reanimated/expo-video immutability false positives
  - Fix useReelProcessing useCallback deps (user vs user?.id)
  - Suppress setState-in-effect for batch reset patterns
  - Suppress preserve-manual-memoization for stable ref identity
  - Prefix unused initialMessages param with underscore
Comment thread services/hocuspocus/src/blockNoteXmlToHtml.ts Fixed
Movm added 2 commits March 7, 2026 15:33
CodeQL flags [^>]* as polynomial on input with repeated <blockGroup
without closing >. Excluding < from the character class prevents the
regex from consuming across tag boundaries.
@Movm Movm merged commit 3af4e18 into master Mar 7, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants