File-based session persistence for the web UI.
Sessions are stored as Erlang term binaries under ~/.ex_athena/web/sessions/. A compact JSON index at ~/.ex_athena/web/recent.json tracks the most recently opened working directories so users can jump back to a project quickly.
Summary
Functions
Delete a session file.
List all session headers, newest first.
List session headers for a specific working directory, newest first.
Return the list of recently opened working directories, newest first. Each entry: %{cwd: path, name: basename, opened_at: DateTime.t()}
Load a full session by id.
Remove a working directory from the recent list.
Persist a session. Overwrites if the id already exists.
Record a working directory as recently opened (deduplicates, caps at 20).
Functions
Delete a session file.
@spec list() :: [map()]
List all session headers, newest first.
List session headers for a specific working directory, newest first.
@spec list_recent() :: [map()]
Return the list of recently opened working directories, newest first. Each entry: %{cwd: path, name: basename, opened_at: DateTime.t()}
Load a full session by id.
@spec remove_recent(String.t()) :: :ok
Remove a working directory from the recent list.
@spec save(map()) :: :ok
Persist a session. Overwrites if the id already exists.
@spec touch_recent(String.t()) :: :ok
Record a working directory as recently opened (deduplicates, caps at 20).