Skip to content

feat: durable file-backed persistence for walkie web UI#16

Open
jack-arturo wants to merge 1 commit into
vikasprogrammer:mainfrom
verygoodplugins:feat/file-backed-persistence
Open

feat: durable file-backed persistence for walkie web UI#16
jack-arturo wants to merge 1 commit into
vikasprogrammer:mainfrom
verygoodplugins:feat/file-backed-persistence

Conversation

@jack-arturo

Copy link
Copy Markdown
Contributor

Summary

Makes the walkie web UI prefer a durable server-side state file (~/.walkie/web-state.json) for identity + joined channels, while keeping localStorage as a resilient offline cache.

This ensures that:

  • Name ("jack") and joined channels survive browser clears, profile switches, incognito, and different machines.
  • Full service/hub restarts no longer require re-joining channels manually.
  • The same state file can be used by the CLI in the future for full parity.

Changes

  • Flip load/save priority in the web UI so GET/PUT /state (backed by ~/.walkie/web-state.json) is the primary source.
  • Export STATE_FILE, readState, and writeState helpers from src/web.js for future CLI use.
  • Fully backward compatible — if no state file exists, behavior is unchanged.

Testing

  • Verified manually: wrote state file with 7 channels + name, started server from branch, reloaded browser → UI loaded directly into chat with all channels present (no name prompt).
  • Existing web tests still pass (modulo daemon startup flakiness in the test env).

This is a small, focused improvement that builds directly on the recent browser persistence work (#10).

Ready for review. Feedback welcome!

…tence

- Flip load/save priority so ~/.walkie/web-state.json (via GET/PUT /state) is the primary source of truth for identity + joined channels.
- localStorage remains as a resilient offline cache.
- Export readState/writeState + STATE_FILE from web.js for future CLI parity.
- Survives browser clears, profile switches, and full service restarts.
@jack-arturo jack-arturo marked this pull request as ready for review June 18, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant