Skip to content

[Feature] Session Auto-Save Indicator #932

Description

@akramcodez

Description

Add a subtle visual indicator in the corner of the CLI that briefly flashes when the session state is autosaved to disk.

Use Case

Since Nanocoder is local-first and maintains continuous semantic memory, users want peace of mind knowing that their complex agent interactions and context are safely persisted to disk. A small visual confirmation builds trust in the auto-save mechanism without interrupting the chat flow.

Proposed Solution

  • Add a small isSaving boolean state to the global application context.
  • When the internal saveSession or updateHistory function triggers, set isSaving to true.
  • In the main layout component (e.g., the bottom status bar or next to the token counter), conditionally render a subtle or [Saving...] text.
  • Revert the state back to false after the write operation completes.

Alternatives Considered

  • Printing a "Session Saved" log message in the chat feed (too noisy and clutters the UI).

Additional Context

  • I have searched existing issues to ensure this is not a duplicate
  • This feature aligns with the project's goals (local-first AI assistance)

Implementation Notes (optional)

  • Ink.js renders very fast, so if the disk write is nearly instantaneous, the indicator might flicker too fast to see. Consider wrapping the state revert in a setTimeout(..., 500) to ensure it's visible for at least half a second.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions