fix: /local-workspace — chemin du header + clic sur un dossier du sidebar (v7.69.9)
FlowDeck CI / lint (push) Successful in 1m37s
FlowDeck CI / test (push) Failing after 24m19s
FlowDeck CI / docker (push) Skipped

Corrige deux régressions de /local-workspace :

- le chemin du header restait bloqué sur « Home / <workspace> » quel que
  soit le dossier affiché : la route rend désormais breadcrumb_items
  (Home / <workspace> / <dossier> / <sous-dossier>, niveaux cliquables,
  collapse « … » au-delà de 4) et la navigation sans rechargement recalcule
  le chemin via l'event flowdeck:breadcrumb-changed ;
- le clic sur un dossier du sidebar affichait TOUS les composants à la
  fois : Alpine.data('wsInitData') retournait le même objet singleton, le
  2e montage (navigation partielle) levait « Cannot redefine property:
  \ » et initTree abandonnait, laissant tout le contenu au state
  brut. La factory retourne désormais une enveloppe fraîche par montage
  qui délègue à l'état réactif partagé. #lw-config est aussi relu à chaque
  exécution (le 2e montage gardait le folder_id du 1er chargement).

Inclus également le travail en cours de l'arbre : Library (colonnes Last
visited/Source, ordre d'en-tête, favoris à icônes Workspace), Meeting
Notes (bloc, CSS, routes, docs), coloration de code hljs, badges
favori/publié dans l'arbre local-workspace, docs (DATA_MODEL,
architectures) et tests associés.
This commit is contained in:
2026-10-09 16:58:04 -04:00
parent 7468e497c6
commit 0218d8f5e5
44 changed files with 12060 additions and 1729 deletions
+15 -3
View File
@@ -7,7 +7,11 @@ from __future__ import annotations
from pathlib import Path
from app.services.export import _CODE_LANG, _TEXTUAL_EXTS
from app.services.export import (
_TEXTUAL_EXTS,
_TEXTUAL_FILENAMES,
code_lang_for_file,
)
from app.services.importers.base import ImportPage, ImportResult
_MD_EXTS = {"md", "markdown"}
@@ -17,6 +21,14 @@ def _ext(path: str) -> str:
return Path(path).suffix.lower().lstrip(".")
def _basename(path: str) -> str:
return path.replace("\\", "/").rsplit("/", 1)[-1].lower()
def _is_textual(path: str) -> bool:
return _ext(path) in _TEXTUAL_EXTS or _basename(path) in _TEXTUAL_FILENAMES
def build_repo_result(
files: list[tuple[str, str]],
*,
@@ -34,7 +46,7 @@ def build_repo_result(
if ext in _MD_EXTS:
markdown = content
else:
lang = _CODE_LANG.get(ext, "")
lang = code_lang_for_file(clean)
markdown = f"```{lang}\n{content.rstrip()}\n```"
parts = clean.split("/")
result.pages.append(ImportPage(
@@ -69,7 +81,7 @@ async def fetch_forge_repo(
files: list[tuple[str, str]] = []
for meta in metas:
file_path = meta.get("path") or ""
if _ext(file_path) not in _TEXTUAL_EXTS:
if not _is_textual(file_path):
continue
if int(meta.get("size") or 0) > max_file_bytes:
continue