Vérification d'applications jsgui3

VérifiéSûr

Vérifier que les applications SSR + client-activation jsgui3 fonctionnent réellement, en évitant les pièges de réattachement silencieux.

Spar Skills Guide Bot
TestingAvancé
19/08/2026
Claude CodeCursorCodex
#ssr#jsgui3#ui-verification#browser-debugging#reattachment

Recommandé pour

Synthèse automatique

Explique comment prouver qu'une application jsgui3 (SSR + activation côté client) fonctionne réellement, en mesurant le comportement dans un navigateur plutôt qu'en le déduisant du code source.

Points forts

  • Documente le contrat de réattachement mesuré : ce qui survit au passage SSR → client (arbre de contrôles, _ctrl_fields) et ce qui est perdu (propriétés assignées dans compose, data.model, nœuds de texte)
  • Fournit une recette concrète : redémarrer le serveur, attendre la stabilisation de l'activation, vérifier une console propre, assertir sur le contenu et non sur la forme
  • Propose des techniques de preuve réellement discriminantes (marker-then-refresh) au lieu de « ça a toujours l'air rempli »
  • Cadre le piège central : les échecs sont silencieux et ressemblent à des problèmes de style, donc une suite de tests verte ne prouve rien

Limites

  • Très spécifique à jsgui3 et à ce projet (chemins src/ui/server/*/controls/, comportement de Server({Ctrl}) au boot)
  • Le tableau de réattachement est daté et issu d'une seule base de code : il peut dériver avec les versions de la bibliothèque
  • Suppose un serveur lancé et une session navigateur pour mesurer ; ce n'est pas une vérification statique
Quand l'utiliser

À utiliser dès que vous modifiez, relisez ou déboguez un Control jsgui3 et devez prouver que la page fonctionne avant d'affirmer qu'elle est vérifiée.

Quand l'éviter

Inutile pour une UI qui n'utilise pas jsgui3, ou lorsqu'aucun serveur ni navigateur ne peut être lancé pour effectuer la mesure.

Analyse de sécurité

Sûr
Score qualité86/100

This is pure documentation: guidance on verifying a jsgui3 SSR/client-activation app with browser-based checks. It declares no allowed-tools, contains no executable commands, no curl|sh, no file deletion, no network exfiltration, and no attempts to disable safety controls. The only actions referenced (restarting a dev server, clicking elements in a browser, reading DOM properties) are ordinary development verification steps.

Aucun point d'attention détecté

Comment cette analyse est faite

Exemples

Verify a changed control
I just edited a control under src/ui/server/board/controls/ — restart the server, load the page, wait for activation, and prove my change actually takes effect before I write 'verified' in the commit message.
Renders empty or stale
My jsgui3 Data_Grid renders blank after reattachment. Walk the control tree in the browser and tell me what was restored versus what was lost, and whether this is a compose-property or data.model problem.
Stock control adoption
I swapped in a stock jsgui3 control and it renders with no columns. Measure it in the live browser and tell me whether the columns were dropped on reattachment before I report it as a library bug.

name: jsgui3-verify description: How to prove a jsgui3 SSR + client-activation app actually works, and the traps that make it look like it works when it does not. Use this skill whenever you change, review, or debug anything under src/ui/server/*/controls/ or any jsgui3 Control — before claiming a change works, when a control renders empty or stale, when adopting a stock jsgui3 control, or when a green test suite disagrees with what the page does. Also use it before writing "verified" in a commit message or ledger row about UI work.

Verifying a jsgui3 app

jsgui3 renders on the server and reattaches in the browser. That seam is where this project's UI bugs live, and it has a specific property that makes it dangerous: failures are silent and look like styling. A control that lost its data renders — it just renders empty, or stale, or blank-but-correctly-shaped.

Every UI defect this project has shipped was a verification failure, not a coding failure. The code was plausible; the check was too weak to catch it.

The rule that would have prevented all of them

Measure the runtime. Do not infer it from the source.

In one session an agent read jsgui3's constructors and made three confident claims about reattachment. All three were later measured false, and two had already been written into a defect report for another team. The measurement that settled them took about two minutes.

Reading a constructor and predicting what happens at runtime is inference. Loading the page and looking is measurement. Say which one you did.

The reattachment contract (measured, 2026-07-30)

What the client gets back, verified in a live browser — not read off the source:

| Restored | Not restored | |---|---| | The full control tree: content._arr repopulated, .parent set, descendants reachable by a plain recursive walk | Anything assigned to this during compose — this.grid = grid is undefined in the browser | | _ctrl_fields, hydrated as real properties (a reattached Panel has content_container; a Data_Grid has table) | data.model — every reattached control gets a fresh empty Data_Object | | Scalars the server put in this._fields (serialized to data-jsgui-fields) | Text nodes — raw text in SSR markup is in the DOM but absent from content, and clear() destroys it | | DOM events, mutation API (add(), clear(), add_class()), mixins | A stock control's columns / rows unless it opted in (see traps) |

The mechanism: reattachment constructs every control down the spec.el path, which skips compose entirely. That single fact explains most of the table. control-enh.js: pre_activate_content_controls does the restoring.

Reach a collaborator by walking the tree (.parent upward, content._arr downward, matching __type_name). Do not build a parallel registry of marker attributes and document.querySelector — that was tried here, on the false belief that the tree was flat, and deleted.

The recipe

  1. Restart the server. Server({Ctrl}) publishes the SSR HTML and the bundle once, at boot. Editing a control and reloading the page shows you the old build. Almost every "my change did nothing" moment is this.
  2. Load the page, wait for activation to settle (~1.5–2.5s), then assert.
  3. Console must be clean. Check it explicitly. A swallowed error is how a dead feature survives for cycles.
  4. Assert on content, not shape. See below.
  5. Check the invariants for this app: /tech/* still 302s, #node= / #branch= deep links still select and scroll, SSR renders the board without activation, SSE activity patches / cards re-applies.

Proof techniques that actually discriminate

To prove a list repainted — marker-then-refresh. "It still looks populated" proves nothing; the SSR markup also looks populated.

document.querySelector('SELECTOR').setAttribute('data-stale','1');
document.querySelector('[data-ps-refresh]').click();
// after the refresh: 0 elements with [data-stale] === it genuinely rebuilt

To prove content is right — read it, do not count it. A stock Chip was given spec.text when it reads spec.label. It rendered the correct number of correctly-shaped pills, all blank, for two cycles. The check that missed it was chips: 2. The check that caught it read chips.map(c => c.textContent).

Assert DOM properties, not textContent. textContent counts hidden nodes, which once produced a false "the pill appeared".

For exactly-one-of behaviour, do it twice. Select A, select B, then count. One selection proves nothing about exclusivity — and the two paths (mouse and hash/deep-link) can differ. They did: the mouse path deselected correctly while the hash path did not, because it wrote ctrl.selected = true instead of calling action_select_only().

Trap list

  • An SSR'd Data_Grid/Data_Table needs persist_activation_state: true. Without it the reattached grid has zero columns and renders the right number of rows with no cells — which reads as a CSS bug. aria-colcount visibly drops from N to 0. A grid composed at runtime does not need it.
  • Check a stock control's spec before passing anything. Chip takes label, not text. Read the .d.ts or the constructor; the library's specs are not guessable and the failure is silent.
  • Controls composed into an already-activated parent never activate. Call pre_activate() then activate() on the new subtree. pre_activate is what installs the vdom→DOM sync listener — activate alone leaves the control live but deaf, so later add_class() and attribute writes silently do nothing.
  • Survey before building. jsgui3 ships ~155 controls and ~48 mixins. Proposing to build Panel, Chip, Badge or Button has happened here more than once.
  • Stock controls carry their own theme. Key_Value_Table and Chip ship light-on-white and read as holes cut in a dark page. Check computed styles, not just that the control rendered.
  • The deep relative requires are deliberate. ../../../../../../../jsgui3-client points at the sibling repo; require('jsgui3-client') resolves to an older node_modules copy. Do not "tidy" them into package specifiers.
  • CSS lives on the control as Ctrl.css = \…`beforemodule.exports— the documentedstatic css` hook. The bundler collects it from the bundle text.

Reporting

State the evidence kind for every claim: measured (ran it, saw output), source-read (read code, reasoned), inferred (weaker). If a check was not run, do not imply it was — read the actual output before writing a number into a commit message. "21/21 probes" was once written when the run said 19 pass, 1 fail, 1 skip.

If a claim is refuted later, record it as refuted, with the reason. A withdrawn claim kept on the record is worth more than a plausible one quietly deleted.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/verifying-jsgui3-apps-mszmca20' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/verifying-jsgui3-apps-mszmca20/download' --output '.skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md.part' && mv '.skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md.part' '.skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md' && test -s '.skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/jsgui3-verify' && cp -R '.skill-downloads/verifying-jsgui3-apps-mszmca20' '.claude/skills/jsgui3-verify'

Cursor
test -f '.skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md' && test -s '.skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/jsgui3-verify' && cp -R '.skill-downloads/verifying-jsgui3-apps-mszmca20' '.cursor/skills/jsgui3-verify'

Codex
test -f '.skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md' && test -s '.skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/jsgui3-verify' && cp -R '.skill-downloads/verifying-jsgui3-apps-mszmca20' '.agents/skills/jsgui3-verify'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/verifying-jsgui3-apps-mszmca20'

openskills read 'verifying-jsgui3-apps-mszmca20'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/verifying-jsgui3-apps-mszmca20/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires