paritytech / paritytech/host-rust-core

RFC: Product session restore host API

Open
#483 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

rfc
Dominant language
Swift
Stars
10
Forks
3
Avg merge
1d 10h
Merged PRs (30d)
148

Description

Source PR: #71 · docs/rfcs/0016-product-session-restore.md · @replghost

Description

A product checkpoints its own session state into a reserved storage key and receives host lifecycle events, so it can flush before backgrounding, restart or force quit. The host owns storage, scheduling and retention; the product owns serialization.

Motivation

A host can reopen the product set but not the working context, so a product comes back to its start page with the draft, step or selection gone. No browser API serializes a live JS heap, so the state has to be semantic and product-written.

Requirements

  • host_session_lifecycle_subscribe delivers the events; state bytes go through the existing local-storage methods.
  • The reserved storage key is __truapi/session_restore/v1.
  • The blob carries an envelope version, a product schema version, and a Json or Cbor state payload.
  • Restore is best-effort with a cold-boot fallback, and state never reaches another product.

Tasks

  • RFC document body
  • Implementation — rust-core
  • Implementation — hosts
    • dotli
    • Desktop
    • iOS
    • Android
    • host-cli

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/rfcs/0016-product-session-restore.md and Source PR #71. Compare the RFC requirements with the existing local-storage methods and host_session_lifecycle_subscribe API described by the issue. Done means the RFC body and the listed rust-core and host implementations are addressed, including dotli, Desktop, iOS, Android, and host-cli.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.