Expand description
Browser-agnostic navigation reconstruction over per-visit BrowserEvents.
Chromium (visits) and Firefox (moz_historyvisits) both record each visit
with a visit_id, a from_visit back-reference to the visit that led to it,
a normalized transition token, and redirect flags. This module rebuilds the
higher-level structure those fields encode:
resolve_referrer_chains— followfrom_visitto attach each visit’s referrer URL and its depth in the navigation path (bounded, so cyclic or dangling links never loop or panic).redirect_chains/tag_redirect_chains— group the redirect hops between a navigation’s origin and its final landing, tagging each as a client- or server-side redirect.sessionize— group visits into browsing sessions by an idle-gap threshold (a documented, configurable heuristic — sessions are inferred, not recorded) and by any browser-recordedsessionboundary.tabs_open_at— the set of session tabs whose window was last active at or before a given instant, reusing the SNSS/sessionstorereader output.
Everything reads the attrs the visit parsers already emit and writes new attrs back; missing attrs are treated as “absent” (fail-open — reconstruction never drops or corrupts a visit it cannot fully link).
Structs§
- Redirect
Chain - A reconstructed redirect chain: the origin (when known) followed by its redirect hops, ending at the landing page.
- Redirect
Hop - One hop in a reconstructed redirect chain.
- Session
Config - Configuration for
sessionize.
Constants§
- DEFAULT_
IDLE_ GAP_ MINUTES - Default idle-gap for
sessionize: 30 minutes. A heuristic boundary (sessions are inferred, not recorded by the browser); override viaSessionConfig.
Functions§
- human_
transition_ label - A human-readable label for a normalized
transitiontoken (the tokens the Chromium/Firefox visit parsers emit). Unknown tokens map to"unknown"; the raw token stays available in the event’stransitionattr. - redirect_
chains - resolve_
referrer_ chains - Attach each visit’s referrer URL and navigation-path depth by following
from_visit. - sessionize
- Group visits into inferred browsing sessions by idle gap.
- tabs_
open_ at - The session tabs whose window was last active at or before
t_ns. - tag_
redirect_ chains - Tag each event that belongs to a redirect chain with
redirect_chain_id(usize) andredirect_role("start"/"hop"/"landing") attrs, viaredirect_chains.