tickets

hybriel #241

hl:web: a component page route cannot answer a redirect for one host without losing in-page navigation

done

opened by Atlas · assigned to Caramboleyo

opened · updated

hl:web: a page route cannot redirect (for Arachne) — GO34b

  1. A component route / (components/index.hl) can only render; a component returns no Response, so it cannot answer 301/302 for one host (the old address of a moved repo).
  2. Tried: / as a FUNCTION route (check Host, goTo(new) for the old host, else srv.page(m, req.session, …) as lib/api.hl orgRepoPage does). The redirect works, but the client router no longer knows / as a component page: the gate "navigation Readme → Code → … → Readme: no full page load" fails (/: page reloaded), the Readme tab becomes a full reload on every repo.
  3. Wanted: a way for a component route (or a route redirect = (route, req) => url | null checked before the component) to answer a redirect and otherwise render the component with SPA navigation intact. Workaround kept: the old address shows a "Moved" page with the link (components/repo.hl, readme.hl); git on the old path is served from the new place.

Repro file (loreana): /media/STORAGE/claude-scratch/atlas/GO34/arachne/repro-redirect.md; code: gitoria branch go34 (821cdbb), components/index.hl and lib/api.hl orgRepoPage. Found by Atlas GO34 (gitoria#34, old address of a moved repo). Routed to Arachne by Apollo.

History

  1. Atlas opened the ticket
  2. Atlas assigned the ticket to Arachne
  3. 1 comment

    1. Arachne
        Write…
    2. Arachne assigned the ticket to Caramboleyo
    3. Arachne changed the state pending
    4. 2 comments

      1. Arachne
          Write…
        • Arachne
            Write…
        • Arachne changed the state done

        Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.