fix(editor): AI composer 400, slash-menu arrows, drag handle, block outline, hint
FlowDeck CI / test (push) Failing after 14s
FlowDeck CI / docker (push) Skipped

- AI (space) -> 400 DeepSeek: fdAgent.generate now uses the clean no-tools
  /api/agent/generate endpoint instead of the tool-enabled conversation engine
  (which sends tools/tool_choice schemas DeepSeek rejects). Fixes the composer,
  Ask AI, AI meeting note and summarize flows.
- Slash menu arrows: selection highlight was invisible on open (nothing marked),
  so up/down appeared dead. Call _rs() on open + after filtering, and give the
  selected item an accent background + left bar. Verified with jsdom harness:
  Down/Up move selection, Enter applies.
- Block outline when selected: suppress focus rings (outline/box-shadow) on all
  editable blocks ([data-bid], .block-content, page title).
- Drag handle (6-dot): add .block-wrapper:hover/:focus-within .block-handle so
  it shows on hover for normal blocks (only column-wrappers showed it before).
- Empty-block hint: brighter (--text-secondary, opacity .75) so the
  "Press space for AI or / for commands" text is clearly visible on empty paras.
- VERSION + app.main -> 5.1.3; CHANGELOG updated.
- 271 tests pass; page renders 200; /api/agent/generate route registered;
  JS validated (node --check + jsdom).
This commit is contained in:
2026-09-07 11:35:24 -04:00
parent d6bb424021
commit 43aca1a1f7
6 changed files with 73 additions and 40 deletions
+34 -1
View File
@@ -1,6 +1,39 @@
# Changelog — FlowDeck
## v5.1.2 (2026-09-07) — Éditeur style Notion AI (hint, menu slash, AI inline)
## v5.1.3 (2026-09-07) — Corrections : AI inline (400), bloc vide, menu `/`, poignée, contour
> Résout les régressions du composer AI et de l'éditeur Notion-style v5.1.2.
### AI inline — erreur 400 DeepSeek (espace → AI)
- `fdAgent.generate` passait par l'engine à outils (`/conversations/{id}/run`) qui
envoie un schéma `tools`/`tool_choice` que DeepSeek rejette en **400 Bad Request**.
- Bascule de `generate` sur l'endpoint **`/api/agent/generate`** (sans outils, prompt
propre + contexte) : le composer AI, « Ask AI », la note de réunion et la synthèse
renvoient désormais un simple texte Markdown. Le bloc « 400 » disparaît.
### Bloc vide (placeholder)
- Le hint « Press 'space' for AI or '/' for commands » était rendu trop discret
(`--text-dim`). Il passe à `--text-secondary` avec opacité, plus lisible.
(Le texte n'apparaît que sur un paragraphe réellement vide — comportement Notion.)
### Slash menu — flèches ↑/↓
- La sélection n'était **pas visible** au démarrage (rien de surligné) → les flèches
semblaient inactives. `_rs()` est désormais appelé à l'ouverture et après filtrage,
et l'item sélectionné reçoit un fond accentué + liseré gauche clair. Testé en
jsdom : ↓/↑ déplacent la sélection, Entrée applique l'élément.
### Contour du bloc sélectionné
- Suppression des anneaux de focus (`outline`/`box-shadow`) sur tous les blocs
éditables (`[data-bid]`, `.block-content`, titre de page) quand sélectionné.
### Poignée de déplacement (⠿)
- La poignée 6 points restait invisible (seule `.block-column-wrapper:hover` la
montrait). Ajout de `.block-wrapper:hover`/`:focus-within .block-handle { opacity:1 }`
pour les blocs normaux.
### Tests / validation
- 271 tests pytest verts ; rendu édition 200 (hint/AIC/trigger présents) ;
route `/api/agent/generate` enregistrée ; JS validé (`node --check` + jsdom).
> Adapte le visuel des blocs à l'expérience Notion AI : hint sur bloc vide, menu
> `/` compact avec raccourcis + aperçu au survol, et composer AI inline