fix(web): les fichiers s'ouvrent enfin, et le travail git par projet au centre
Deux défauts d'usage de la zone centrale de l'IDE. 1. Ouvrir un fichier affichait une page vide. Le conteneur de l'unique instance Monaco vivait sous le `v-if="activeTab"` : monté sans onglet actif (premier usage, ou après avoir tout fermé), `onMounted` sortait en silence sur `!host.value`, `ready` restait faux pour toujours, et les deux watchers d'affichage étaient gardés par lui. Le conteneur est désormais toujours monté (v-show, jamais v-if : sous un v-if, fermer le dernier onglet détruisait le DOM et l'éditeur gardait une référence sur un noeud détaché) et l'éditeur est créé paresseusement depuis `showTab`, devenu l'unique entonnoir d'affichage. `useMonaco` ne mémoïse plus un échec, l'attente et l'erreur sont visibles, et la relecture disque ne se tait plus. Sur mobile, ouvrir un fichier amène enfin la zone centrale au premier plan et la valeur morte `mobilePanel = 'sidebar'` disparaît (migrée). Trouvé par l'E2E : seul l'`editor.worker` était fourni, donc ouvrir un `.ts` lançait le service TypeScript contre un worker qui n'en connaissait pas les méthodes, et jetait un rejet non géré à chaque ouverture. Les workers de langage sont fournis (chunks à la demande), diagnostics sémantiques coupés (sans tsconfig ni node_modules, ils inventeraient des erreurs). 2. Le statut git était à l'étroit et mono-projet. La zone centrale porte un mode « Fichiers / Changements » (bascule à icônes dans la barre d'onglets, donc accessible même sans onglet ouvert). La vue Changements montre un bloc par worktree pour TOUS les projets ouverts : fichiers indexés et non indexés, diff déplié sur place, commit, push, fetch, pull et historique par bloc. Le panneau Git de la barre latérale devient l'index (compteurs déjà diffusés par WS, donc zéro requête) et le badge de la barre d'activité, codé à 0, compte enfin les worktrees à traiter. Au passage : `canPush` était faux dans les deux sens (actif sans rien à pousser, bloqué en étant seulement en retard), l'amend d'un message seul est accepté comme le serveur le permettait déjà, le rebase est proposé dès qu'on est en retard, une confirmation d'abandon ne survit plus au rechargement de la liste, et `commit`/`fetch`/`push` émettent enfin `worktree_changes` (le compteur « n non poussés » restait périmé juste après un push). Vérifié : 528 tests, acceptations P7/P9/P14/P15, `verify-ui` (4 captures nouvelles) et un `verify-editor` qui prouve par clics réels l'ouverture d'un fichier sans onglet persisté, la fermeture/réouverture, la bascule mobile et le chunk éditeur absent. Ce dernier échoue bien si l'on remet le conteneur sous un v-if.
This commit is contained in:
@@ -3,6 +3,40 @@
|
||||
Notable changes to `@johanleroy/git-arboretum` (the Arboretum daemon). The VS Code
|
||||
extension keeps its own changelog in `packages/vscode/CHANGELOG.md`.
|
||||
|
||||
## 3.6.0
|
||||
|
||||
Files open again, and uncommitted work gets a real surface: one block per project, in the centre of
|
||||
the IDE. Fully additive, no protocol version bump.
|
||||
|
||||
- **Opening a file showed an empty page.** The container of the single Monaco instance lived inside a
|
||||
`v-if`, so mounting the IDE with no open tab (first use, or after closing everything) bailed out
|
||||
silently and the editor was never created: the first file you opened rendered nothing, with no
|
||||
spinner and no error. The container is now always mounted and the editor is created on demand.
|
||||
Closing the last tab no longer destroys it either.
|
||||
- **The editor now says when it cannot load.** A missing editor chunk (a stale `index.html` after an
|
||||
update, a network drop) used to be memoized as a permanent failure, silently, for the whole
|
||||
session. It reports the failure, offers Retry and Reload page, and shows a loading state while the
|
||||
chunk and the file are fetched. A file that disappears under the editor is reported instead of
|
||||
being swallowed.
|
||||
- **No more console errors when opening TypeScript.** Only the base worker was provided, so the
|
||||
TypeScript language service kept calling a worker that did not implement its methods, throwing on
|
||||
every single file open. The language workers are shipped now (loaded on demand). Semantic
|
||||
diagnostics stay off on purpose: with no tsconfig and no node_modules, they would invent errors.
|
||||
- **Changes: your uncommitted work, per project, in the centre.** Two buttons on the right of the tab
|
||||
bar switch the centre between Files and Changes. Changes shows one block per worktree across every
|
||||
open project, each with its staged and unstaged files, its diff unfolded in place, its commit,
|
||||
push, fetch and pull, and its own history. The Git panel in the sidebar becomes the index: what
|
||||
each project is worth at a glance, one click to open the matching block. The activity bar badge
|
||||
finally counts the worktrees that need attention.
|
||||
- **Push and commit buttons tell the truth.** Push was enabled with nothing to push and disabled when
|
||||
merely behind; it now follows what git will actually do. Amending just a message is allowed, as the
|
||||
server already did. A rebase is offered as soon as the branch is behind, not only after a
|
||||
fast-forward fails.
|
||||
- **Commit, fetch and push refresh what they change.** They only broadcast a worktree update, so the
|
||||
"n unpushed" counter stayed stale right after a push, and files just committed were still listed.
|
||||
- On mobile, tapping a file in the explorer now brings the editor to the front, and the Git tab opens
|
||||
the Changes view (the sidebar index is a desktop affordance).
|
||||
|
||||
## 3.5.1
|
||||
|
||||
Completes the terminal copy & paste of 3.5.0, which only worked in a browser.
|
||||
|
||||
Reference in New Issue
Block a user