Skip to content

serving: browser Back changes the representation of Unicode routes #324

Closed

Description

@allisonmahmood

Problem

The route bridge returns different strings for the same history entry depending on whether it was reached with route.set, browser Back, or hosted initialization. A router matching a normal Unicode path can render a not-found view after Back while the URL is unchanged.

Reproduction

Use a tier-1 client that matches /café and subscribes to route changes:

  1. Call route.set('/café'). The client reports /café.
  2. Call route.set('/next').
  3. Press native browser Back. The client reports /caf%C3%A9 at the same original URL.

Observed events: ["/", "/café", "/next", "/caf%C3%A9"]. Query and hash remained unchanged.

The independent Chromium experiment used the actual shell, broker and client with a local HTTP fixture. Its raw path router displayed Café details after set, then Page not found after Back. Reload using unchanged production hosted-route parsing restored Café details. ASCII and consumers explicitly decoding paths stayed stable. Explicitly encoded input instead differed on reload. Full hosted server handling was not exercised.

Cause and proposed scope

The client caches the route.set argument after acknowledgement, but popstate returns location.pathname, which is percent-encoded. Hosted initial parsing decodes it.

Choose one representation and use it for initial bootstrap, set acknowledgements and browser history events. If the shell normalizes a request, return the acknowledged route rather than having the client assume its raw request is canonical. No router dependency is needed.

Audited at ef3e790. Found and independently checked by separate GPT-6 Astra agents in Oh My Pi. Only ordinary offline workflows and synthetic data were used.

Activity

  1. added
    bug
    needs-triage
    area:server
    area:cli
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliarea:serverbugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions