Skip to content

Version 1.7.0#70

Open
JosunLP wants to merge 41 commits intomainfrom
development
Open

Version 1.7.0#70
JosunLP wants to merge 41 commits intomainfrom
development

Conversation

@JosunLP
Copy link
Copy Markdown
Collaborator

@JosunLP JosunLP commented Mar 27, 2026

This pull request introduces significant improvements to project documentation, contributor guidelines, and developer workflow for bQuery.js. It updates and expands the documentation to reflect new modules, clarifies public API update procedures, and enhances test and CI workflows. The changes also refine the project's architecture documentation and labeling system to support new feature areas.

Documentation and Contribution Workflow Updates:

  • Major rewrite and restructuring of .github/copilot-instructions.md to provide a concise orientation, clarify source-of-truth files, outline public API update requirements, and document common workflows and pitfalls. The new instructions emphasize keeping documentation and agent context in sync when public APIs change.
  • Updated .clinerules and .cursorrules to require updating documentation (README.md, AGENT.md, llms.txt, and relevant guides) when public module surfaces change, and to document new public modules and usage patterns. [1] [2] [3]

Architecture and API Documentation Enhancements:

  • Expanded AGENT.md to reflect new modules (forms, i18n, a11y, dnd, media, plugin, devtools, testing, ssr, storybook), updated the version to 1.7.0, and documented new exports and helpers across modules. [1] [2] [3] [4] [5]

Developer Workflow and CI Improvements:

  • Updated the test workflow in .github/workflows/test.yml to add a type-check step for tests, improving CI reliability.
  • Enhanced the labeler configuration in .github/labeler.yml to support new feature module directories, ensuring PRs are properly categorized.

Review Feedback Fixes:

  • Fixed SanitizeOptions re-export in src/security/index.ts to use ./types instead of ./sanitize, ensuring type exports work correctly.
  • Aligned documentation guides with shipped APIs: removed unsupported fade option from morphElement(), updated parallax() options to direction/respectReducedMotion, fixed typewriter() controls to .done/.stop(), corrected droppable() callback to use zone instead of dropzone, and removed unsupported maxTimelineEntries from devtools guide.
  • Standardized mediaQuery().destroy() in src/media/media-query.ts to use Object.defineProperty for consistency with viewport.ts and network.ts.
  • Gated $onAction observer error logging behind isDev in src/store/create-store.ts to reduce noise in production builds.
  • Restored lightweight shadow DOM consistency checks in canSkipInputRender/canSkipTextareaRender in src/component/library.ts to prevent skipping re-renders when the DOM has diverged from expected props.
  • Hardened router constraint handling by rejecting additional nested-quantifier cases while allowing safe quantified group syntax like (?:...), with focused regressions for both accepted and rejected patterns.
  • Updated src/a11y/media-preferences.ts so prefersContrast() reuses existing MediaQueryList instances instead of re-running matchMedia() on every update.
  • Gated persisted-store migration/version warning logs behind isDev to avoid noisy production startup and retry logging when storage is unavailable or blocked.
  • Re-exported the testing Route type from src/index.ts so the root entry point matches the testing module's public type surface.
  • Added a dev-only warning for unknown bq-* directives in the view processor to make typos and missing custom directive registrations easier to diagnose.
  • Made persisted-store state restoration schema-preserving by ignoring persisted keys that are not part of the default state shape.
  • Improved invalid route constraint regex errors to include the underlying syntax failure details while keeping the friendly bQuery router prefix.
  • Fixed the root testing Route type-surface regression test so CI test:types validates against the full route contract.
  • Moved shared development-environment detection into a low-level internal utility so browser builds default to production-safe logging behavior when process/NODE_ENV are not detectable, removed the new view/component dependency on store internals, and added a globalThis.__BQUERY_DEV__ override so dev diagnostics can still be enabled without a process shim.
  • Refined the shared dev-environment behavior so real Node-like runtimes without NODE_ENV still default to development, while browser/no-process environments remain production-safe.
  • Tightened the shared dev-environment heuristic so lightweight browser process shims without Node markers no longer enable dev-only diagnostics in production builds.
  • Updated view, store, and component diagnostics to re-check the shared detector at logging time so late globalThis.__BQUERY_DEV__ toggles take effect consistently after module import.
  • Guarded the new dev-only store $onAction logger for environments where console is unavailable.
  • Aligned the top-level breakpoints().destroy() descriptor with the other media signal handles by making it configurable and using the same handle-style method shape.
  • Added targeted tests for $onAction lifecycle behaviors: listener ordering, sync/async after-hook timing, and error isolation ensuring listener failures don't change action results.
  • Added targeted tests for route param constraints, including named backreferences (\k<name>), nested quantifier rejection (ReDoS protection), and safe constraint validation.
  • Added focused regressions for prefersContrast() media-query reuse, unknown view-directive warnings, schema-preserving persisted-state merges, invalid route constraint regex diagnostics, the root testing Route type export surface, production-safe no-process dev logging behavior, explicit __BQUERY_DEV__ override behavior for view/component/store diagnostics, real Node-like missing-NODE_ENV dev defaults, browser process-shim production-safe behavior, late override toggles after module import across view/store/component diagnostics, and breakpoint destroy descriptor consistency.

Most important changes:

Documentation and Contribution Process

  • Overhauled .github/copilot-instructions.md to clarify project orientation, source-of-truth files, public API update workflow, and documentation map.
  • Updated .clinerules and .cursorrules to require updating documentation and guides when public APIs change, and to document new modules and usage patterns. [1] [2] [3]

Architecture and API Documentation

  • Expanded AGENT.md with new modules, updated version to 1.7.0, and added documentation for new exports and helpers in component, storybook, motion, and security modules. [1] [2] [3] [4] [5]

Developer Workflow and CI

  • Added a type-check step for tests in the CI workflow to ensure type safety in test code.
  • Updated labeler config to include new feature module directories for better PR categorization.

Code Quality and Correctness

  • Fixed doc/API mismatches across motion, dnd, devtools, and security guides.
  • Standardized media signal destroy() pattern, gated store observer logging to dev mode, restored component skip-render DOM consistency checks, and reduced persisted-store warning noise in production.
  • Improved router constraint validation so safe quantified group syntax is accepted without weakening nested-quantifier ReDoS protection, and invalid constraint errors now include underlying syntax details.
  • Reused existing contrast-preference media-query handles to avoid repeated matchMedia() calls on updates.
  • Added dev-only warnings for unknown view directives to improve diagnostics for typos and missing custom directive registrations, then moved shared dev-environment detection into a low-level internal utility so browser production builds default to no dev logging when the environment is not detectable while still allowing explicit browser-dev opt-in via globalThis.__BQUERY_DEV__, preserving development defaults in real Node-like runtimes without NODE_ENV, preventing lightweight browser process shims from enabling production logging, and allowing late override toggles to take effect after import across view/store/component diagnostics.
  • Preserved persisted-store schema by ignoring unknown persisted keys during state restoration.
  • Re-exported the testing Route type from the root entry point for a more consistent public API surface.
  • Aligned breakpoint handle descriptors with the rest of the media module for more uniform destroy() behavior across media helpers.
  • Added targeted regression tests for store $onAction lifecycle, router constraint security behavior, contrast media-query reuse, unknown view-directive warnings, schema-preserving persisted-state merges, root testing type exports, production-safe no-process dev logging, explicit __BQUERY_DEV__ override behavior, real Node-like missing-NODE_ENV development defaults, browser process-shim production-safe behavior, late override toggle behavior across view/store/component diagnostics, and breakpoint destroy descriptor consistency.

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI review requested due to automatic review settings March 27, 2026 23:29
@github-actions github-actions bot added core Changes to the core module reactive Changes to the reactive module component Changes to the component module motion Changes to the motion module router Changes to the router module security Changes to the security module store Changes to the store module view Changes to the view module docs Changes to the documentation tests Chenges to the tests build Changes to the build and meta files ci/cd Changes to the action workflows github Changes to the github meta data files labels Mar 27, 2026
@JosunLP JosunLP self-assigned this Mar 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps bQuery.js to v1.7.0 and expands the library’s public surface area with multiple new first-class modules, while updating documentation and CI to match the new architecture and workflows.

Changes:

  • Adds new runtime modules/entry points (SSR, testing, plugin, devtools, media, dnd, forms, i18n, a11y) and wires them into exports.
  • Extends existing core/router/store/reactive/component APIs (e.g., router param constraints, store $onAction, computed disposal, custom directives).
  • Updates docs, changelog, package exports, and CI (adds test type-check step).

Reviewed changes

Copilot reviewed 123 out of 145 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/view/process.ts Adds custom directive resolution hook into the view processing pipeline.
src/view/evaluate.ts Hardens object-expression parsing against prototype pollution keys.
src/view/custom-directives.ts New indirection layer for plugin-registered custom directives.
src/testing/types.ts Adds public type definitions for the new testing utilities module.
src/testing/index.ts Exposes testing utilities runtime API and related types.
src/store/watch.ts Loosens action typing to support strongly-typed params/returns.
src/store/utils.ts Adds explicit boolean annotation for isDev.
src/store/types.ts Adds action lifecycle types, persisted-store options types, storage/serializer types, and $onAction.
src/store/mapping.ts Loosens action typing for action-mapping helpers.
src/store/index.ts Re-exports newly added store types (action lifecycle + persistence types).
src/store/define-store.ts Loosens action typing for defineStore.
src/store/create-store.ts Implements $onAction lifecycle hooks and error isolation in action observers.
src/ssr/types.ts Introduces public SSR types (render/hydrate/serialize).
src/ssr/index.ts Adds SSR module entry point with docs and exports.
src/ssr/hydrate.ts Adds hydrateMount() wrapper around mount() with hydrate semantics.
src/security/trusted-html.ts Adds trusted/sanitized HTML branding + helpers for safe template composition.
src/security/sanitize.ts Changes sanitizeHtml return type to branded SanitizedHtml; exports trusted.
src/security/index.ts Exposes trusted HTML helpers/types and updates SanitizeOptions type export path.
src/router/utils.ts Enhances resolve() to support param constraints and required-param validation.
src/router/use-route.ts Adds useRoute() composable returning focused readonly signals.
src/router/types.ts Extends route definitions (redirect routes, per-route beforeEnter) and router options (scrollRestoration).
src/router/query.ts Hardens query parsing against prototype pollution keys.
src/router/path-pattern.ts Adds internal helpers for parsing param names and constraints.
src/router/index.ts Updates router module docs and exports (useRoute, bq-link).
src/router/constraints.ts Adds constraint normalization + caching + ReDoS/backreference protections.
src/reactive/computed.ts Adds computed disposal support and improves caching semantics when disposed.
src/plugin/types.ts Adds public types for plugins, install context, and directives/components integration.
src/plugin/index.ts Adds plugin module entry point with exports.
src/motion/typewriter.ts Adds a new typewriter text animation utility.
src/motion/types.ts Adds motion types for morph/parallax/typewriter APIs.
src/motion/reduced-motion.ts Adds global reduced-motion override via setReducedMotion.
src/motion/parallax.ts Adds scroll-linked parallax effect utility.
src/motion/morph.ts Adds FLIP-based morph animation helper.
src/motion/index.ts Exposes new motion APIs and updated module description.
src/media/viewport.ts Adds useViewport() reactive viewport signal handle.
src/media/types.ts Adds shared media signal handle types and state shapes.
src/media/network.ts Adds useNetworkStatus() reactive network signal handle.
src/media/media-query.ts Adds mediaQuery() reactive media-query signal handle.
src/media/index.ts Adds media module entry point and type exports.
src/media/geolocation.ts Adds useGeolocation() reactive geolocation signal handle.
src/media/device-sensors.ts Adds reactive device motion/orientation signal handles.
src/media/clipboard.ts Adds async clipboard wrapper API.
src/media/breakpoints.ts Adds named breakpoint reactive signals with cleanup.
src/media/battery.ts Adds useBattery() reactive battery signal handle.
src/index.ts Re-exports new modules from the root bundle and adds explicit a11y re-export list.
src/i18n/types.ts Adds public types for i18n module.
src/i18n/translate.ts Adds translation resolution/interpolation/pluralization + safe deep merge.
src/i18n/index.ts Adds i18n module entry point and exports.
src/i18n/i18n.ts Implements createI18n() with signals, lazy loading, formatting, and merging.
src/i18n/formatting.ts Adds Intl-based number/date formatting helpers.
src/forms/types.ts Adds public types for the forms module.
src/forms/index.ts Adds forms module entry point and exports validators/form factory.
src/dnd/index.ts Adds DnD module entry point and exports.
src/dnd/droppable.ts Implements pointer-event-based drop zones with shared global listeners.
src/devtools/types.ts Adds public types for devtools module.
src/devtools/index.ts Adds devtools module entry point and exports.
src/core/utils/index.ts Adds BQueryUtils interface and types utils namespace explicitly.
src/core/shared.ts Adds isHTMLElement and getOuterSize internal helpers.
src/core/index.ts Exports BQueryUtils type from core entry point.
src/core/collection.ts Adds jQuery-parity helpers (detach/index/contents/offsetParent/position/outerWidth/outerHeight).
src/component/scope.ts Adds component-scoped reactive primitives that auto-dispose on disconnect.
src/component/library.ts Updates default input/textarea to use old/new props in beforeUpdate and skip rerenders when only value changes.
src/component/index.ts Exposes new component exports/types, including scoped reactivity helpers and bool.
src/component/html.ts Adds bool() boolean-attribute helper and upgrades safeHtml() to support trusted fragments + branding.
src/a11y/types.ts Adds public types for the a11y module.
src/a11y/trap-focus.ts Adds focus trapping utility + focusable selector helper.
src/a11y/roving-tab-index.ts Adds roving tabindex utility for keyboard navigation patterns.
src/a11y/index.ts Adds a11y module entry point and exports.
src/a11y/announce.ts Adds screen reader announcements via ARIA live regions.
package.json Bumps version to 1.7.0, adds new export entry points, adds test:types, updates devDependencies.
mise.toml Pins bun toolchain via mise.
llms.txt Updates the public module map/documentation to 1.7.0.
docs/index.md Updates docs landing page feature list to include new modules.
docs/guide/testing.md Adds testing guide page for new testing module.
docs/guide/storybook.md Adds storybook guide page for new story helpers.
docs/guide/store.md Documents $onAction and advanced persisted-store options.
docs/guide/ssr.md Adds SSR guide page (render/serialize/hydrate).
docs/guide/security.md Documents trusted fragment composition with trusted() + safeHtml.
docs/guide/router.md Documents constraints/redirects/beforeEnter/useRoute/bq-link/scroll restoration.
docs/guide/plugin.md Adds plugin guide page (directives/components/introspection/reset).
docs/guide/motion.md Documents new motion features and reduced-motion override.
docs/guide/media.md Adds media guide page for reactive browser/device APIs.
docs/guide/i18n.md Adds i18n guide page for locale/translation/formatting.
docs/guide/getting-started.md Updates getting started guide to include new modules and examples.
docs/guide/forms.md Adds forms guide page for reactive forms and validators.
docs/guide/dnd.md Adds drag & drop guide page.
docs/guide/devtools.md Adds devtools guide page.
docs/guide/components.md Expands component docs for new helpers (bool/trusted, scoped signals, lifecycle changes).
docs/guide/api-core.md Documents new core collection APIs and typed utils access.
docs/guide/a11y.md Adds accessibility guide page.
docs/definition.md Updates architecture definition to include new modules and examples.
docs/.vitepress/config.ts Adds new guide pages to VitePress sidebar.
CHANGELOG.md Adds 1.7.0 release notes and TOC entries.
.github/workflows/test.yml Adds a test type-check step to CI.
.github/labeler.yml Extends label patterns to cover new module directories.
.cursorrules Updates contributor/agent workflow guidance for new modules and docs.
.clinerules Requires keeping docs and agent context in sync with public API changes.

Copilot AI and others added 14 commits March 28, 2026 00:35
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
* Initial plan

* feat: add per-component sanitizer options

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs: clarify component sanitizer baseline

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs: warn about sensitive component sanitizer opts

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* test: cover sanitizer allowTags overrides

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* perf: precompute component sanitizer allowlists

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

---------

Signed-off-by: Jonas Pfalzgraf <info@josunlp.de>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
* Initial plan

* Add previous props to beforeUpdate hook

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Refine beforeUpdate old props implementation

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Fix beforeUpdate typing regressions

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

---------

Signed-off-by: Jonas Pfalzgraf <info@josunlp.de>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
* Initial plan

* feat: add component signal subscriptions

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* chore: document signal subscription tracking

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address signal integration review feedback

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: tighten component signal typing

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: resolve eslint failure in component signal test

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: handle reconnect lifecycle and signal effect errors

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: preserve reconnect signal wiring after hook errors

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: skip beforeUpdate for signal rerenders

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

---------

Signed-off-by: Jonas Pfalzgraf <info@josunlp.de>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
* Initial plan

* feat: add trusted safeHtml fragment support

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* chore: finalize trusted safeHtml support

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs: address trusted safeHtml review feedback

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs: fix second trusted safeHtml review follow-up

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* refactor: split trusted html helpers from sanitizer

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* refactor: tighten trusted html branding

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs: tighten trusted html internals

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

---------

Signed-off-by: Jonas Pfalzgraf <info@josunlp.de>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
…#63)

* Initial plan

* feat: add storybook template helper

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs: clarify storybook when fallback behavior

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: keep storybook helpers out of full bundle

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: sanitize storybook helper output

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* test: tighten storybook helper security coverage

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* feat: enhance storyHtml with improved boolean attribute handling and sanitization tests

* fix: update storyHtml example to reflect correct boolean attribute output

* fix: defensive tag delimiter and parser comments per code review

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
- Update CHANGELOG.md for version 1.6.0 release notes including added features, changes, fixes, and security improvements.
- Enhance README.md to document new boolean attribute helpers and Storybook integration.
- Update bun.lock to reflect dependency upgrades for Storybook and happy-dom.
- Modify definition.md to include new Storybook helpers and component state management features.
- Revise components.md to demonstrate new boolean attribute handling and typed state in components.
- Update getting-started.md with Storybook authoring examples and improved module descriptions.
- Enhance security.md to clarify sanitization practices and introduce trusted fragment handling.
- Revise index.md to highlight new Storybook helpers in the feature list.
- Update llms.txt to reflect the new version 1.6.0.
- Bump version in package.json to 1.6.0 and update devDependencies for Storybook.
…nent state keys (#65)

* Initial plan

* Address review feedback for test typing and setup

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Finalize review feedback fixes

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Export component state key type

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Default component state key generic

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
…tization (#66)

* Initial plan

* fix review follow-up for state updates and storybook sanitization

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix storybook attribute value scanning

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix storybook interpolation boundary parsing

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs align storybook attribute scan jsdoc

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…sting, SSR, and related areas (#69)

* feat(component): add lifecycle hooks, shadow mode toggle, and scoped reactivity

- onAdopted() lifecycle hook for adoptedCallback
- onAttributeChanged(name, oldVal, newVal) hook with observeAttributes option
- shadow option: true | false | 'open' | 'closed' for Shadow DOM control
- useSignal(initialValue) with auto-disposal on disconnect
- useComputed(fn) with auto-disposal on disconnect
- useEffect(fn) with auto-disposal on disconnect
- 22 new tests covering all new features

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/e1fab322-992d-4507-a3dd-45145e8a8349

* refactor: address code review feedback on scope.ts and test comments

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/e1fab322-992d-4507-a3dd-45145e8a8349

* feat(forms): add reactive form handling module with validation

New module `@bquery/bquery/forms` providing:
- createForm() with reactive fields, errors, dirty/touched tracking
- Built-in validators: required, minLength, maxLength, pattern, email,
  url, min, max, custom, customAsync
- Cross-field validation support
- Async validation support
- Submit handling with isSubmitting state and concurrency guard
- 81 comprehensive tests

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/badfe103-017c-46b3-9dcc-4bf1b580d15b

* fix: make isSubmitting test deterministic without setTimeout

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/badfe103-017c-46b3-9dcc-4bf1b580d15b

* feat(store): add $onAction lifecycle hooks and enhanced persisted store options

$onAction(callback) provides before/after/error hooks for every action
execution, matching Pinia's API. Sync and async actions are both
supported.

createPersistedStore now accepts a PersistedStoreOptions object with:
- storage: custom StorageBackend (localStorage, sessionStorage, etc.)
- serializer: custom StoreSerializer (serialize/deserialize)
- version + migrate: schema versioning with automatic migration
- key: custom storage key

Backward-compatible: the old (definition, storageKey?) signature still
works.

Includes 19 new tests covering all new functionality.

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/20631c9a-f5a0-4aa3-9370-4e7ddfb561da

* fix(store): log warning when migration write-back fails

Address code review feedback: when storage quota prevents saving
migrated state, log a warning so developers know migration will
re-run on next load.

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/20631c9a-f5a0-4aa3-9370-4e7ddfb561da

* feat(motion): add morphElement, parallax, typewriter and global reduced motion toggle

Implements the remaining P1 backlog items from section 3.6:
- morphElement(from, to, options): FLIP-based morph animation between elements
- parallax(el, options): scroll-linked parallax with rAF throttling
- typewriter(el, text, options): character-by-character text animation with cursor
- setReducedMotion(override): global toggle for reduced motion preference

All new features respect prefers-reduced-motion by default, support
graceful fallbacks when APIs are unavailable, and include full JSDoc
with @example blocks.

Added 23 new tests covering all features including edge cases.

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/ad80d4be-90fd-4ce6-8d2e-0399facf414a

* feat(router): add regex param constraints, redirectTo, beforeEnter, useRoute, scroll restoration

Implements remaining P1 router backlog items (3.7):
- Route params with regex constraints: /user/:id(\d+) syntax
- redirectTo option for automatic route redirects (with chaining)
- Per-route beforeEnter guards (run before global beforeEach)
- useRoute() composable for fine-grained reactive access to path, params, query, hash
- Scroll position restoration on back/forward navigation
- 23 new tests (103 total router tests, all passing)

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/4c85b5e9-3250-46d4-a87f-c81bf2ce7d16

* fix(router): remove identity replacement flagged by CodeQL

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/4c85b5e9-3250-46d4-a87f-c81bf2ce7d16

* feat(i18n): add internationalization module with reactive locale, interpolation, pluralization, lazy-loading, and Intl formatting

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/13d7e43a-0aa5-49da-93d8-1358b26c8824

* fix(i18n): guard deepMerge against prototype pollution

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/13d7e43a-0aa5-49da-93d8-1358b26c8824

* feat(a11y): add accessibility utilities module with focus trapping, screen reader announcements, roving tab index, skip link, media preferences, and audit

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d2da63cd-9af5-46d6-b537-63e4475bbb79

* refactor(a11y): extract announcement delay as named constant per review

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d2da63cd-9af5-46d6-b537-63e4475bbb79

* feat(dnd): add Drag & Drop module with draggable, droppable, sortable

Implements P2 backlog item 3.12:
- draggable(el, options): pointer-event-based dragging with axis lock,
  bounds constraints, handle support, ghost/clone preview, touch support
- droppable(el, options): drop zones with enter/over/leave/drop callbacks
  and accept filtering
- sortable(container, options): sortable lists with animated reordering,
  placeholder elements, and handle support
- Full TypeScript types for all APIs
- 40 tests covering happy path, edge cases, and option combinations
- Module wired up: package.json, vite.config.ts, index.ts, full.ts

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/53a5a602-6335-4520-b5af-736750661c59

* feat(media): add Media module with reactive browser and device API signals

Implements P2 backlog item 3.13:
- mediaQuery(query): reactive boolean signal for CSS media queries
- breakpoints({sm,md,lg,xl}): named breakpoints as reactive signals
- useViewport(): reactive {width, height, orientation}
- useNetworkStatus(): reactive {online, effectiveType, downlink, rtt}
- useBattery(): reactive battery status (level, charging, etc.)
- useGeolocation(options?): reactive geolocation with watch mode
- useDeviceMotion(): reactive accelerometer + gyroscope
- useDeviceOrientation(): reactive compass/orientation
- clipboard.read()/clipboard.write(text): async clipboard wrappers
- Full TypeScript types for all APIs
- 40 tests covering all features
- Module wired up: package.json, vite.config.ts, index.ts, full.ts

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/05abb751-6e09-48f1-84e3-abd4c5d3c7b7

* feat(router): add <bq-link> custom element for declarative SPA navigation

Implements the last remaining P1 router feature from backlog §3.7:
- BqLinkElement class with to/replace/exact/active-class attributes
- Reactive active class via routeSignal effect (startsWith or exact)
- aria-current="page" for accessibility
- Click/keyboard handlers with modifier key support (ctrl/meta = new tab)
- registerBqLink() for idempotent custom element registration
- 26 new tests covering all behaviors
- Exported from router barrel, index.ts, and full.ts

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/256885ee-6468-4fd5-af4c-8df3cda00862

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix(router): improve bq-link active matching to respect path segment boundaries

Fixes incorrect active-class matching where /user would match /user-profile.
Now correctly requires path segment boundary (/ separator) for non-exact matches.

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/256885ee-6468-4fd5-af4c-8df3cda00862

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* feat(plugin): implement global plugin system (P3 §3.14)

Add `use(plugin)` for global plugin registration with:
- BQueryPlugin interface: { name, install(ctx, options) }
- PluginInstallContext with directive() and component() helpers
- Custom directives integrated into view module's processElement
- Idempotent plugin installation (deduplicated by name)
- getInstalledPlugins(), isInstalled(), getCustomDirective(s)
- resetPlugins() for testing
- 36 comprehensive tests covering all APIs and edge cases
- Wired into package.json exports, vite.config.ts, index.ts, full.ts

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/c8f58093-94b1-4051-bd44-32acd83ed915

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* feat(devtools): implement P3 §3.15 DevTools module

Add runtime debugging utilities for bQuery:
- enableDevtools()/isDevtoolsEnabled() - toggle development mode
- trackSignal()/untrackSignal()/inspectSignals() - signal inspector
- inspectStores() - store state inspection via registry
- inspectComponents() - detect registered custom elements in DOM
- recordEvent()/getTimeline()/clearTimeline() - timeline event log
- logSignals()/logStores()/logComponents()/logTimeline() - console helpers
- getDevtoolsState() - full state snapshot

Wired into package.json, vite.config.ts, src/index.ts, src/full.ts
37 comprehensive tests, 1079 total (0 failures)

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b28fdc00-5f0b-4a6a-82ea-1a71cdfe7892

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* feat(testing): implement P3 §3.16 Testing Utilities module

Add @bquery/bquery/testing with six utilities:
- renderComponent(tagName, options) — mount custom elements for testing
- flushEffects() — synchronously flush pending reactive effects
- mockSignal(value) — controllable signal with set()/reset()
- mockRouter(options) — lightweight mock router without History API
- fireEvent(el, event, options) — dispatch events and flush effects
- waitFor(predicate, options) — async polling assertion helper

Wired into package.json, vite.config.ts, src/index.ts, src/full.ts
58 comprehensive tests, 1137 total (0 failures)

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/ee604414-0fc8-4ab5-956c-8430fd65d284

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* test(testing): add initialValue immutability test for mockSignal

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/ee604414-0fc8-4ab5-956c-8430fd65d284

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* feat(ssr): implement P3 §3.17 SSR/Pre-rendering module

Add new @bquery/bquery/ssr module with:
- renderToString(template, data, options) - server-side template rendering
- hydrateMount(selector, context, { hydrate: true }) - client-side hydration
- serializeStoreState(options) - serialize store state to <script> tag
- deserializeStoreState(globalKey) - read SSR state on client
- hydrateStore(id, state) / hydrateStores(stateMap) - apply SSR state

Supports bq-text, bq-if, bq-show, bq-for, bq-class, bq-style,
bq-html, bq-bind:attr directives in SSR mode. XSS protection via
HTML entity escaping in serialized script tags.

63 new tests, full suite: 1201 pass, 0 fail across 20 files.

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f4bb8aa5-3a4a-4985-a2ee-589bd7037d99

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix(ci): resolve test typecheck issues and extend labeler areas

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/c2d4d819-1aa3-4d83-8165-0867028e799a

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix(codeql): resolve advanced security alerts in route parsing and SSR

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/371a4223-6e2e-4e38-9ff6-d12a43030afd

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix(codeql): harden i18n deepMerge result storage

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/6ae53d8a-17c7-4ab3-9e00-48e224c4a525

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix(ssr): support arbitrary serialize global keys

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b3da22b5-c4a6-4b9c-8441-b85b68a82345

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix(review): address follow-up review comments

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/65ceb9ee-57d6-4eb4-ad2c-f82f5fdd43cf

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix(store): guard invalid persisted deserialization

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/07a8d6bc-7f07-49ad-9642-39a4433d087d

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix(dnd): keep ghost drag offset accumulated

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b5efaa5d-f17e-498a-a589-e0f4c9b62fe3

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix(review): address follow-up router and scope issues

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/316457d1-5be1-4f31-92b8-b51ac538b0fb

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix follow-up review comments for media and docs

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3c4c6a79-87b7-46fc-b46a-0cb48f7c71d6

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address final router and media review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1a8ea220-b17e-47c7-bc22-cbe6b7c9243a

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: tighten router review follow-up edge cases

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1a8ea220-b17e-47c7-bc22-cbe6b7c9243a

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: preserve replace scroll state and clarify root link matching

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1a8ea220-b17e-47c7-bc22-cbe6b7c9243a

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address latest router media and async review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/661ad0ba-3d1f-49d6-ad8f-ce32497f801c

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix latest review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/12cb8d56-ef72-4ea0-9f19-62087bc756d4

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix latest router review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/cb4ba277-999e-4bb1-9af4-b5794f4cfd99

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix latest review thread follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/a08549e2-5072-4781-86ae-fbb1cbbf58e5

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address latest SSR router and plugin review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/fdb4822a-e835-4ec8-9b6d-045a15a42cc2

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address latest router, media, store, and motion review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/a1687df0-2d60-4a2b-aecb-dd03453a42cf

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* test: tighten follow-up regression assertions

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/a1687df0-2d60-4a2b-aecb-dd03453a42cf

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address latest router, plugin, and store review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/4ac6bb3e-4266-481d-b243-c286171bd039

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address latest router and ssr review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/c656b68d-1e26-47ad-8488-9fc0970e68f0

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix hydration type and attribute scope handling

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0094b226-f76a-4f2e-9f4b-2ae886b91adc

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix deferred attribute-change component scope

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/98085801-780b-4fdf-b690-1e0626a36053

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* refine deferred scope initialization

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/98085801-780b-4fdf-b690-1e0626a36053

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix review feedback for droppable and hydration safeguards

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* chore: clarify droppable test flush timing

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs: clarify shared listener cleanup behavior

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* chore: polish review follow-up naming

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs: clarify final review nits

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Fix final PR review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/881683e5-6c3c-4232-9290-70cabbec03ce

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix follow-up review thread issues

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/86998fd1-75d3-4d30-9e13-f2980af668ee

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Fix router constraint and SSR review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b806b9c0-e9ec-4c53-928a-0a123fccfa00

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Tighten SSR serializer review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b806b9c0-e9ec-4c53-928a-0a123fccfa00

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix review follow-ups for SSR forms and router

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/28db5d3e-2fc8-4533-8647-23ca1f6f107c

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* harden preserved router history state

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/28db5d3e-2fc8-4533-8647-23ca1f6f107c

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Fix latest review thread follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Polish review follow-up fixes

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Tighten parallax cleanup regression

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Resolve final review nits

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Finalize teardown safety fixes

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: reject malformed router param constraints consistently

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b7e6e34e-c106-4f7b-8337-91068bae0ec7

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address remaining review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/19558e34-256d-47cc-a529-bcc6eeabe839

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: polish follow-up review notes

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/19558e34-256d-47cc-a529-bcc6eeabe839

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* docs: clarify morph display fallback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/19558e34-256d-47cc-a529-bcc6eeabe839

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address follow-up review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/8ca9e6af-0689-4aba-b60e-bd1a69610495

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix follow-up review issues for motion reactive and ssr

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/2a06ebf9-fff5-4608-af95-11f0f91232da

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address latest review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f82e26dd-119b-4df3-8266-9a2784f66074

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* chore: install deps for review fixes

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address review security findings

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: finalize SSR escaping compatibility

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* perf: cache constraint regexes in review fixes

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: harden follow-up review findings

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* chore: polish SSR protocol guard naming

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* Potential fix for code scanning alert no. 38: DOM text reinterpreted as HTML

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Jonas Pfalzgraf <jolun.swtor@gmail.com>

* Potential fix for code scanning alert no. 39: DOM text reinterpreted as HTML

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Jonas Pfalzgraf <jolun.swtor@gmail.com>

* fix: address latest review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* perf: polish router review follow-ups

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* test: cover long constrained router paths end-to-end

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* perf: avoid fallback candidate array allocations

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: disallow empty router wildcard candidates

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: allow empty wildcard suffix matches

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* fix: address follow-up review thread comments

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/03b45c29-7ee7-4f25-8a4e-79ed9c4500ee

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* refactor: polish follow-up review fixes

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/03b45c29-7ee7-4f25-8a4e-79ed9c4500ee

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* refactor: clarify persistence and DOM guards

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/03b45c29-7ee7-4f25-8a4e-79ed9c4500ee

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* style: tighten skip-link DOM guard checks

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/03b45c29-7ee7-4f25-8a4e-79ed9c4500ee

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>

* refactor: enhance skipLink functionality and improve environment checks

* refactor: improve onAdopted lifecycle handling and enhance persisted store migration logic

* refactor: improve code formatting and readability across multiple files

- Updated type definitions in `src/store/types.ts` for better clarity.
- Enhanced readability of function definitions in `src/storybook/index.ts` and `src/view/custom-directives.ts`.
- Reformatted export statements in `src/testing/index.ts` for consistency.
- Improved function signatures in `src/testing/testing.ts` for better alignment.
- Added tests in `tests/a11y.test.ts` and `tests/component.test.ts` to handle edge cases.
- Refactored test cases in `tests/devtools.test.ts`, `tests/i18n.test.ts`, and `tests/media.test.ts` for better structure.
- Enhanced error handling in `tests/plugin.test.ts` and `tests/router.test.ts`.
- Added new tests in `tests/store.test.ts` to ensure state persistence during migrations.
- General cleanup and formatting adjustments across various test files for improved maintainability.

* refactor: enhance security by preventing prototype pollution in query parsing and object expression evaluation

* refactor: enhance component scope management and improve media query listener handling

* refactor: improve media query listener handling and enhance skipLink functionality

* refactor: enhance prototype pollution prevention and improve skip link ID generation

* refactor: enhance form serialization and improve morphElement animation handling

* refactor: improve droppable logic and enhance BqLinkElement active class handling

* refactor: improve skip link target resolution and enhance error handling in component lifecycle

* refactor: enhance skip link behavior, improve network status handling, and add rollback for plugin directives

* refactor: prevent tabindex addition to naturally focusable elements and enhance component registration rollback handling

* refactor: add environment checks for droppable and parallax functions to ensure compatibility with document and RAF APIs

* refactor: enhance type definitions, improve error handling, and update tests for better clarity and functionality

* refactor: enhance form serialization security, improve network status cleanup, and preserve user-authored active classes in router

---------

Signed-off-by: Jonas Pfalzgraf <jolun.swtor@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@JosunLP JosunLP requested a review from Copilot March 28, 2026 22:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 120 out of 135 changed files in this pull request and generated 3 comments.

@JosunLP
Copy link
Copy Markdown
Collaborator Author

JosunLP commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f3b4da78-0d41-468a-8ed4-02cb5d34cd7e

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Applied the latest follow-up in 748f153.

Moved shared dev-environment detection into a low-level internal utility, removed the view/component dependency on store/utils, and added a globalThis.__BQUERY_DEV__ override so dev-only diagnostics can still be enabled without a process shim.

Validation: targeted plugin/component/store suites pass, lint:types passes, build:types passes, full suite passes (1395), lint passes, and CodeQL passes.

No UI changes in this update.

@JosunLP JosunLP requested a review from Copilot March 28, 2026 22:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 136 changed files in this pull request and generated 5 comments.

@JosunLP
Copy link
Copy Markdown
Collaborator Author

JosunLP commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/ad5e7aad-f306-4d62-9956-efe8226d30b9

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Applied the latest follow-up in 9799f7b.

Shared env detection now treats Node-like runtimes without NODE_ENV as development, the view warning path respects late globalThis.__BQUERY_DEV__ toggles, and the store/utils.ts env import is back at the top of the file.

Validation: targeted store/plugin suites pass, lint:types passes, build:types passes, full suite passes (1397), lint passes, and CodeQL passes.

No UI changes in this update.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 136 changed files in this pull request and generated 4 comments.

@JosunLP
Copy link
Copy Markdown
Collaborator Author

JosunLP commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d97659a7-1ca5-4fca-a99b-3ece36f785c3

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Applied the latest follow-up in 4eb660b.

The env detector now requires real Node markers before treating a missing-NODE_ENV process as development, store/component diagnostics re-check the dev flag at log time so late globalThis.__BQUERY_DEV__ toggles work after import, and the new store $onAction logger now guards console.error availability.

Validation: targeted store/component suites pass, lint:types passes, build:types passes, full suite passes (1400), lint passes, and CodeQL passes.

No UI changes in this update.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 136 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

src/component/index.ts:1

  • The changelog/release notes indicate ComponentStateKey is part of the exported public type surface, but it isn’t re-exported from the component entry point here. Add ComponentStateKey to the export type { ... } from './types' list (or adjust the release notes/docs if it’s intentionally not public).
/**

@JosunLP
Copy link
Copy Markdown
Collaborator Author

JosunLP commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/498ecafb-f407-443c-a136-8b9ce3ade50f

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Applied the latest follow-up in 86e6808.

hydrateMount() no longer type-allows hydrate: false, the router resolve() JSDoc now documents regex-constraint failures and invalid constraint syntax, the $onAction dev logger now uses the bracketed store prefix format, and I fixed the test:types regression from the previous follow-up by typing the dynamic store import in the late-toggle test.

Validation: targeted SSR/router/store suites pass, test:types passes, full suite passes (1400), build:types passes, lint passes, and CodeQL passes.

No UI changes in this update.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 136 changed files in this pull request and generated 3 comments.

@JosunLP
Copy link
Copy Markdown
Collaborator Author

JosunLP commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b9508fd8-eb02-4fdd-9ebd-bab28ac625ee

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Applied the latest follow-up in 15941ff.

component/scope.ts now uses type-only imports for Computed/Signal, and $onAction now makes the async-listener contract explicit: Promise-returning listeners emit a dev-only warning that after()/onError() must be registered synchronously, with docs/JSDoc and regression coverage for late async hook registration. I did not change Computed.value because the checked-out code already clears dirty before recomputing.

Validation: targeted store/component suites pass, test:types passes, full suite passes (1401), build:types passes, lint passes, and CodeQL passes.

No UI changes in this update.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 136 changed files in this pull request and generated 3 comments.

@JosunLP
Copy link
Copy Markdown
Collaborator Author

JosunLP commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/6de6f85d-8022-4297-83e7-5ff883179766

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

@copilot apply changes based on the comments in this thread

Applied in ad26217.

I tightened the textarea shadow-label divergence check (and aligned the input variant), softened the $onAction async-listener warning so it gives guidance without treating Promise returns as misuse, and registered the shared droppable pointermove listener as passive. Added focused regressions for the textarea label divergence and passive listener registration, and all targeted checks plus full test/lint/type validation passed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 136 changed files in this pull request and generated 3 comments.

MockSignal,
RenderComponentOptions,
RenderResult,
Route,
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This root entry point already re-exports the router's Route type via export * from './router/index'. Re-exporting the testing module's Route type under the same name will cause a duplicate export name conflict. Fix by aliasing the testing type (e.g., export type { Route as TestingRoute } ...) or renaming the testing type to something unambiguous like MockRoute.

Suggested change
Route,
Route as TestingRoute,

Copilot uses AI. Check for mistakes.
Comment on lines +79 to +81
console.warn(
`[bQuery][view] Unknown directive "${name}" (parsed as "${directive}") on <${el.tagName.toLowerCase()}>. This may be a typo or a missing custom directive registration.`
);
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning string references name, but in this diff hunk there's no guarantee name is in scope (whereas directive clearly is). If name is not defined in this function scope, this will throw a ReferenceError when logging. Use the in-scope directive identifier (or rename variables so the original attribute name is explicitly available and used here).

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +7
import type { ReadonlySignal } from '../reactive/index';

/**
* Type definitions for the bQuery accessibility (a11y) module.
*
* @module bquery/a11y
*/
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module-level JSDoc (including @module) comes after an import. If you rely on TypeDoc/module doc extraction, this can prevent the comment from being treated as the module doc. Move the module JSDoc block to the very top of the file (before imports) to ensure it’s recognized consistently.

Suggested change
import type { ReadonlySignal } from '../reactive/index';
/**
* Type definitions for the bQuery accessibility (a11y) module.
*
* @module bquery/a11y
*/
/**
* Type definitions for the bQuery accessibility (a11y) module.
*
* @module bquery/a11y
*/
import type { ReadonlySignal } from '../reactive/index';

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Changes to the build and meta files component Changes to the component module core Changes to the core module docs Changes to the documentation github Changes to the github meta data files motion Changes to the motion module reactive Changes to the reactive module router Changes to the router module security Changes to the security module store Changes to the store module tests Chenges to the tests view Changes to the view module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants