Skip to content

refactor(nav,auth): switch to async and fix nav refresh ♻️#17

Merged
PierreBrisorgueil merged 1 commit into
pierreb-devkit:masterfrom
PierreBrisorgueil:fixNavAndSwitchAsync
Sep 27, 2019
Merged

refactor(nav,auth): switch to async and fix nav refresh ♻️#17
PierreBrisorgueil merged 1 commit into
pierreb-devkit:masterfrom
PierreBrisorgueil:fixNavAndSwitchAsync

Conversation

@PierreBrisorgueil
Copy link
Copy Markdown
Collaborator

No description provided.

@PierreBrisorgueil PierreBrisorgueil added this to the Release 0.1.0 milestone Sep 27, 2019
@PierreBrisorgueil PierreBrisorgueil self-assigned this Sep 27, 2019
@PierreBrisorgueil PierreBrisorgueil merged commit 5bba9e2 into pierreb-devkit:master Sep 27, 2019
PierreBrisorgueil added a commit that referenced this pull request May 7, 2026
adds @param/@returns JSDoc to: getConfig + onAccept + onReject in cookie banner,
substitutePlaceholders + useLegalPage in useLegalPage.js, mountBanner + vuetify + i18n
factories in banner tests, mountView in page view tests.

addresses CR #3, #10, #12, #14, #15, #17, #20
PierreBrisorgueil added a commit that referenced this pull request May 7, 2026
* feat(posthog): opt-out by default + memory persistence (RGPD gating)

* feat(legal): scaffold module config + i18n locales

* feat(legal): useCookieConsent — storage primitives (load/expire/version)

* test(legal): useCookieConsent action + posthog interaction coverage

* feat(legal): cookie consent banner (v-snackbar accept/reject + i18n)

* chore(legal): drop unused test bindings (lint clean)

* test(legal): cover revokeMessage branch of cookie banner

* feat(legal): mount cookie banner globally in app shell

* feat(legal): useLegalPage — markdown resolver with placeholder substitution

* feat(legal): legal page view (renders markdown by slug, 404 fallback)

* feat(legal): dynamic /legal/:slug router (gated by pages.enabled)

* feat(legal): wire legal routes into app router

* feat(legal): wire legal locales into i18n plugin

* feat(legal): footer auto-injects Legal section + Cookie settings link

* feat(legal): baseline markdown templates with entity placeholders

* docs(migrations): legal module + cookie consent entry

* fix(legal): wire real config into legal.page.view (was empty object stub)

The view had `const config = {}` — a dead stub that never resolved
legal.pages.items, making every slug return the 404 fallback.
Replace with `import config from '@/config'` matching the rest of the module.

* fix(legal): sanitize marked output with DOMPurify to prevent XSS via v-html

Copilot #3204116527: useLegalPage returned raw marked.parse() output that was
injected via v-html. Wrap with DOMPurify.sanitize() (already in devkit deps)
before returning. Add JSDoc to exported function (#3204116570).

Also refactor useLegalPage tests to call the async function directly instead
of mounting a defineComponent wrapper — eliminates brittle setTimeout(0) and
Vue async-setup-without-Suspense warnings (#3204116650). Added XSS regression
test asserting onerror attribute is stripped.

* docs(legal): add JSDoc to useCookieConsent composable

Copilot #3204116607: document returned refs/actions, localStorage key,
expiry behavior, and PostHog opt-in re-apply on mount.

* fix(legal): relative refund link, privacy consent wording, MIGRATIONS no-op note

Copilot #3204116690: change /legal/refund to ./refund in terms.template.md
so the link respects any configured routePrefix.

Copilot #3204116721: reword privacy.template.md §3 to be agnostic of whether
the cookie banner is enabled, and surface dpoEmail as fallback contact.

Copilot #3204116744: correct MIGRATIONS.md description — opt_out_capturing_by_default
is not a no-op; PostHog will capture zero events until the user opts in, and
EU projects MUST enable the consent flow to remain GDPR-compliant.

* refactor(legal): footer registry pattern — decouple core from legal module

Introduces useFooterExtras (module-scope singleton ref) so optional modules
register/unregister footer sections without creating a hard import in core.footer.
Core footer now reads extras[] generically; item.onClick replaces the action string dispatch.
legal.footerSection.component.vue handles registration lifecycle (watch+onUnmounted).
App mounts <legalFooterSection /> next to <legalCookieBanner />.
Tests rewritten to exercise the registry API directly (no legal-specific knowledge in core tests).
Adds legal.footerSection.component.unit.tests.js (5 new tests).
Addresses CR #1, #2.

* fix(legal): useCookieConsent singleton state shared across all consumers

Hoists consent/consentNeeded refs to module scope so banner + footer-section
(and future callers) share the same reactive state. reopenSettings() in one
instance is immediately visible in all others.
Fixes 360-day expiry to 365 days (GDPR 12-month standard).
Adds __resetCookieConsentForTests() to isolate tests; updates all beforeEach
to call it. Adds cross-instance singleton test (CR #19).
Adds set_config assertion to reject test (CR #18).
Addresses CR #13, #11, #18, #19.

* chore(legal): add JSDoc headers for repo guideline compliance

adds @param/@returns JSDoc to: getConfig + onAccept + onReject in cookie banner,
substitutePlaceholders + useLegalPage in useLegalPage.js, mountBanner + vuetify + i18n
factories in banner tests, mountView in page view tests.

addresses CR #3, #10, #12, #14, #15, #17, #20

* chore(legal): fix MD022 — add blank lines after ## headings in markdown files

adds blank line after every ## heading in MIGRATIONS.md and all 6 legal
template files (aup, dpa, legal-notice, privacy, refund, terms) to comply
with markdownlint MD022.

addresses CR #1, #4, #5, #6, #7, #8, #9

* fix(legal): graceful error handling + test cleanup

legal.page.view: wrap useLegalPage call in try/catch — on failure sets
notFound:true instead of propagating unhandled rejection.

legal.cookieBanner tests: add afterEach unmount + body cleanup to prevent
DOM leak across tests (CR #16). add JSDoc to mountBanner factory (CR #3).

addresses CR #16, #22

* refactor(legal): move legal routes to optionalModules pattern

Addresses CodeRabbit finding: legal module was concatenated into coreRoutes
which violates the self-registration principle. Move to optionalModules
(gated via isModuleActive) and add modules.legal.activated:true to both
development and test configs. Routes remain self-gating via legal.pages.enabled.
PierreBrisorgueil pushed a commit that referenced this pull request Jun 1, 2026
# [2.1.0](v2.0.0...v2.1.0) (2026-06-01)

### Bug Fixes

* **billing:** 4 pricing page bugs (signed-in features, hero bg, truncation, guest CTA) ([#4123](#4123)) ([bd399bd](bd399bd))
* **billing:** add aria-expanded + touch support to BillingComputeGauge components ([#4181](#4181)) ([7e7fa97](7e7fa97))
* **billing:** billing UX hardening — 5 reliability fixes ([#4079](#4079)) ([dd62b3d](dd62b3d)), closes [#4078](#4078)
* **billing:** canonical FA6 icons + meterError lifecycle + reject URL credentials ([#4082](#4082)) ([be16045](be16045)), closes [#4081](#4081)
* **billing:** clear intentId on Stripe cancel-redirect ([#4085](#4085)) ([11be9ab](11be9ab))
* **billing:** drop empty overage aria-live div + add fr overDetail key ([#4142](#4142)) ([10e5d81](10e5d81))
* **billing:** i18n migration + Intl.NumberFormat USD (audit Codex P1) ([#4069](#4069)) ([3d3a4f6](3d3a4f6))
* **billing:** mega vue hardening v3 — UX + design + a11y + V4 ([#4063](#4063)) ([802cbc4](802cbc4))
* **billing:** send {} body on portal POST to satisfy Zod PortalRequest schema ([#4137](#4137)) ([bf6b9c8](bf6b9c8))
* **billing:** send intentId UUID to close extras double-charge window ([#4084](#4084)) ([3e27c4c](3e27c4c))
* **billing:** subscription state safety + webhook lag polling (audit Codex P1) ([#4068](#4068)) ([328700b](328700b))
* **billing:** surface meterError + remove dead 409 dialog from subscriptions ([#4081](#4081)) ([61f5d53](61f5d53))
* **billing:** V5 polish — F5 polling recovery + visibility refetch + i18n residual + locale null-guard ([#4070](#4070)) ([4908adb](4908adb))
* **billing:** V6 polish — sessionStorage guard + locale BCP47 + i18n plural + NaN guard ([#4076](#4076)) ([2ad018c](2ad018c))
* **build:** drop ARG defaults for analytics_* + filter empty env vars ([#4112](#4112)) ([afd336e](afd336e)), closes [Vue#4110](https://github.com/Vue/issues/4110) [#4110](#4110)
* **build:** restore Layer 5 empty-string env override (revert [#4112](#4112) part 2) ([c9aa9e6](c9aa9e6)), closes [Vue#4110](https://github.com/Vue/issues/4110) [comes-io/trawl_vue#880](https://github.com/comes-io/trawl_vue/issues/880) [Vue#4110](https://github.com/Vue/issues/4110)
* **core:** pin CorePageHeader to content size in flex-column contexts ([#4210](#4210)) ([e182512](e182512)), closes [#4202](#4202)
* **layout:** route /pricing outside app shell — no drawer offset on signed-in ([#4124](#4124)) ([d862fbb](d862fbb))
* **legal:** cookie banner UA-detection + appName fallback to app.title ([#4113](#4113)) ([04cc70a](04cc70a)), closes [trawl_vue#876](https://github.com/trawl_vue/issues/876) [#4109](#4109)
* **legal:** cookie consent + footer polish (5 QA bugs) ([#4098](#4098)) ([a9bf0a3](a9bf0a3))
* **legal:** gate cookie banner on isMounted to prevent prerender hydration double-render ([#4109](#4109)) ([3198e48](3198e48)), closes [#app](https://github.com/pierreb-devkit/Vue/issues/app)
* **router:** redirect authenticated users to config.sign.route instead of hardcoded '/' ([#4088](#4088)) ([ca9094e](ca9094e)), closes [#4083](#4083)
* **tasks:** propagate store errors so views gate navigation on success ([#4221](#4221)) ([b029d39](b029d39)), closes [#4218](#4218)
* **ui:** chrome convergence — restore section title + surface backgrounds + homogeneous gutter ([#4188](#4188)) ([1e5fdf1](1e5fdf1))
* **users:** re-apply route tab when serverConfig.billing arrives async ([#4138](#4138)) ([87cc7b2](87cc7b2))
* **users:** refetch billing subscription on auth state change ([#4125](#4125)) ([5a3425a](5a3425a))

### Features

* **admin:** invitations management tab ([#4217](#4217)) ([61ad86c](61ad86c)), closes [invitedBy/#actions](https://github.com/pierreb-devkit/Vue/issues/actions)
* **analytics:** add identify and reset helpers, wire auth store ([#4104](#4104)) ([c4d8b87](c4d8b87))
* **auth:** invite-gated signup UI ([#4212](#4212)) ([d17a841](d17a841))
* **billing:** add 'Manage subscription' footer link in meterDrawer ([#4056](#4056)) ([#4057](#4057)) ([7d494af](7d494af))
* **billing:** align packs.component on BillingCardComponent (V4 unified schema) ([#4147](#4147)) ([7f5dd41](7f5dd41))
* **billing:** combined pool gauge + linear breakdown bars + alerts cleanup ([f5034b1](f5034b1))
* **billing:** config-driven static-content resolver (no file replace) ([e95d944](e95d944))
* **billing:** expose netRemainingRaw + overage in useMeter for negative quota display ([#4061](#4061)) ([111e64b](111e64b)), closes [#4060](#4060)
* **billing:** meter gauges display % primary, compute units in overflow tooltip ([#4139](#4139)) ([50498ba](50498ba))
* **billing:** meter UX refonte — drop drawer + subscriptions tab ([#4059](#4059)) ([891b5ae](891b5ae)), closes [#subscriptions](https://github.com/pierreb-devkit/Vue/issues/subscriptions) [#1](#1) [#2](#2) [#3](#3) [#4](#4)
* **billing:** post-grant upgrade prompt variant for depleted signupGrant ([#4128](#4128)) ([0ae8558](0ae8558))
* **billing:** pricing page redesign — multi-mode + auto-savings + sectioned features + FAQ ([#4102](#4102)) ([2c83ab6](2c83ab6))
* **billing:** pricingCard Free CTA — 'Sign up' for guests, route to /signup ([#4106](#4106)) ([cc92ac8](cc92ac8))
* **billing:** redesign Subscriptions view to match user-tabs aesthetic ([#4127](#4127)) ([15fd466](15fd466))
* **billing:** relocate billing under Organization settings ([#4175](#4175)) ([1f36137](1f36137))
* **billing:** sidenav compute gauge above sign-out row (meter mode) ([#4126](#4126)) ([fe1497f](fe1497f))
* **billing:** sidenav compute gauge redesign — button-shape above sign-out row ([#4140](#4140)) ([9d3a090](9d3a090))
* **billing:** sidenav compute gauge revamp — v-progress-circular + v-tooltip ([#4144](#4144)) ([5d60f1b](5d60f1b)), closes [#prepend](https://github.com/pierreb-devkit/Vue/issues/prepend)
* **billing:** subscriptions view 2-col layout — drop dup bar, CTA to /pricing#units ([#4141](#4141)) ([b7ef516](b7ef516)), closes [pricing#units](https://github.com/pricing/issues/units)
* **billing:** unified BillingCardComponent + annual toggle disabled state ([#4146](#4146)) ([474bb11](474bb11))
* **billing:** unified BillingCardComponent + annual toggle disabled state ([#4149](#4149)) ([d1403ff](d1403ff))
* **billing:** v4 hardening + Phase 3 polish — equivalences chips + UX gaps + a11y ([#4066](#4066)) ([dd40b2a](dd40b2a))
* **billing:** wire netRemainingRaw + overage into devkit components ([#4062](#4062)) ([61d6897](61d6897)), closes [#4061](#4061)
* **core:** reusable PageTabs component + Account view refactor ([#4183](#4183)) ([dc2504a](dc2504a))
* **core:** unified logo+title lockup in header and sidenav ([#4086](#4086)) ([ec457db](ec457db)), closes [#4083](#4083)
* **feature:** read ERRORS.md in Phase 0 before coding ([#4089](#4089)) ([ddf8f60](ddf8f60))
* **legal:** Add legal module + cookie consent (RGPD) ([#4097](#4097)) ([595e6c4](595e6c4)), closes [#3204116570](https://github.com/pierreb-devkit/Vue/issues/3204116570) [#3204116650](https://github.com/pierreb-devkit/Vue/issues/3204116650) [#1](#1) [#19](#19) [#18](#18) [#13](#13) [#11](#11) [#18](#18) [#3](#3) [#10](#10) [#12](#12) [#14](#14) [#15](#15) [#17](#17) [#20](#20) [#4](#4) [#5](#5) [#6](#6) [#7](#7) [#8](#8) [#9](#9) [#16](#16) [#3](#3) [#16](#16) [#22](#22)
* **legal:** liquid glass cookie banner — Vuetify-only with friendlier copy ([#4115](#4115)) ([3d74789](3d74789)), closes [#4114](#4114)
* **monitoring:** single-source PostHog Error Tracking (drop Sentry) ([#4118](#4118)) ([82dfca6](82dfca6))
* **organizations:** add Organization tab + rename General route to tab-addressable ([#4184](#4184)) ([fdfbf0b](fdfbf0b))
* **organizations:** soft suggestedJoin onboarding banner + recovery-screen copy ([#4176](#4176)) ([25a3ceb](25a3ceb))
* **seo:** enrich seoInjectPlugin — multi-schemas + rich SoftwareApplication + themeColor ([#4092](#4092)) ([#4111](#4111)) ([7f8bd09](7f8bd09))
* **skill/feature:** add Phase 0.0 issue claim-on-start ([#4117](#4117)) ([a582430](a582430)), closes [pierreb-projects/infra#28](https://github.com/pierreb-projects/infra/issues/28)
* **skills/update-stack:** block on undeclared drift vs upstream ([#4228](#4228)) ([ab8ee68](ab8ee68)), closes [#4227](#4227)
* **users:** subs full-width + delete account danger zone + halo full-bleed fix ([#4143](#4143)) ([981f073](981f073))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant