fix(ci): bring ClientApp & SharePopup within the .astro LOC budget#51
Merged
Conversation
The Validate workflow (required check) has failed on every push/PR since #49: the AC-6 component LOC budget (`.astro` ≤ 200) was breached by ClientApp.astro (419) and SharePopup.astro (399). Extract, verbatim and behavior-preserving: - SharePopup `<style>` → src/styles/sections/share-popup.css (imported globally in Page.astro, mirroring every other section stylesheet). The classes are uniquely `.share-popup-*` prefixed, so global scope is equivalent to the previous scoped block. - ClientApp script logic → ~/lib/share.ts (initSharePopup), ~/lib/scroll.ts (initSmoothAnchors), ~/lib/tweaks.ts (initTweaks), following the existing ~/lib/observers pattern. The EDITMODE sentinel and TWEAK_DEFAULTS literal stay in ClientApp.astro verbatim so the parent-iframe editor keeps finding the markers. ClientApp.astro 419→51, SharePopup.astro 399→95. AC-6 passes; build + 52 unit tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problème
Le check Validate (required) échoue à chaque push/PR depuis #49. Cause : le budget LOC AC-6 (
.astro≤ 200) est dépassé par deux composants ayant grossi avec le share popup :ClientApp.astro— 419 lignesSharePopup.astro— 399 lignesCorrectif (extraction verbatim, comportement préservé)
<style>→src/styles/sections/share-popup.css, importé globalement dansPage.astrocomme toutes les autres feuilles de section. Les classes sont toutes préfixées.share-popup-*, donc le scope global est équivalent au<style>scoped précédent.<script>est déplacée dans des modules TS (pattern~/lib/observersexistant) :~/lib/share.ts→initSharePopup()(confetti, countdown, X / LinkedIn / Copy)~/lib/scroll.ts→initSmoothAnchors()~/lib/tweaks.ts→initTweaks(defaults)/*EDITMODE-BEGIN*/…/*EDITMODE-END*/et le littéralTWEAK_DEFAULTSrestent dansClientApp.astroverbatim, pour que l'éditeur parent-iframe continue de trouver les marqueurs.Résultat :
ClientApp.astro419→51,SharePopup.astro399→95.Validation (= étapes exactes du job Validate)
npm run buildnpm test— 52/52bash tests/check-component-loc.sh— AC-6 PASSNote hors-scope (déploiement)
Le workflow Deploy to AIDD est indépendant de Validate et reste bloqué pour une autre raison : le runner self-hosted
aidd-manifestestoffline, donc les déploiements restentqueuedpuiscancelled. Cela nécessite de relancer le service runner sur le serveur AIDD — ce n'est pas corrigeable par cette PR.🤖 Generated with Claude Code