# Changelog

## Unreleased

## 0.1.2 - 2026-10-01

**Highlights:** Navigation, refresh, cancellation, and cache state now stay aligned across overlapping route transitions.

### Fixed

- Abort a preload joined by navigation when the router stops so a late loader result cannot replace the next active match.
- Let a pending navigation finish when invalidate or revalidate runs without a route id, so the destination stays active instead of leaving history and router state split.
- Reject loader redirect cycles and chains longer than 10 redirects during navigation and preload; even terminating chains above the limit now fail. Thanks @SebTardif.
- Restore strict dependency engine checks with pnpm 11 so unsupported development installs fail early. Thanks @dependabot.
- Ignore cancelled preload failures and redirects after stopping so late results cannot start new loads or remove replacement cached matches.
- Contain synchronous component and loader exceptions so parallel load failures cannot escape as unhandled rejections or prevent component loading.
- Ignore late lifecycle-hook failures after navigation is superseded or the router stops, preserving the current route state.
- Prevent infinite or oversized cache retention from overflowing host timers, preserving finite expiry and clearing obsolete preload timers. Thanks @SebTardif.
- Use the latest navigation context for history changes and establish new context before listening when restarting history. Thanks @SebTardif.

### CI

- Refresh Node types, the type-aware linter, and CodeQL while retaining the Node 25-compatible build toolchain. Thanks @dependabot.
- Refresh development dependencies, pnpm, and pinned GitHub Actions without changing the router API or runtime requirements.
- Pass the repository explicitly to the GitHub Release job so it works without a local checkout.

## 0.1.1

### Fixed

- Cancel pending navigation when returning to the active route so stale loaders cannot win later.

## 0.1.0

Initial standalone release of `@openclaw/uirouter`.

### Added

- Added the framework-independent router core with route matching, route
  identity, history integration, navigation, redirects, not-found results,
  lifecycle hooks, and reactive subscriptions.
- Added active, pending, and cached route match records with dependency-keyed
  identity through `loaderDeps`.
- Added component loading and route data loading with preload, stale reload,
  invalidation, revalidation, retry, cancellation, stale-result suppression,
  and garbage collection.
- Added public TypeScript contracts and ESM package exports for the router API,
  page definitions, route locations, history adapters, matches, loader results,
  redirects, and not-found results.
- Added package contract tests for route matching, navigation, control results,
  stale navigation, preloading, invalidation, subscriptions, history, loading,
  lifecycle hooks, retry, and cache behavior.
- Added package validation that builds, packs, verifies the tarball allowlist,
  installs the packed package, and imports `@openclaw/uirouter`.

### Documentation

- Added README coverage for installation, quick start, browser history
  integration, loaders, loader dependencies, caching, redirects, not-found
  results, subscriptions, preloading, invalidation, revalidation, lifecycle
  hooks, and API reference.
- Added GitHub PR and issue templates tailored to router package changes.
- Added agent instructions documenting package ownership, architecture
  boundaries, commands, verification, and contribution expectations.

### CI

- Added GitHub Actions CI across Node 22 and Node 24 on Ubuntu, macOS, and
  Windows.
- Added CodeQL scanning for JavaScript/TypeScript and GitHub Actions workflows.
- Added tag-driven npm trusted-publishing release automation, stale triage,
  CODEOWNERS, SECURITY.md, and CONTRIBUTING.md.
