Cancelling the name prompt in "Save & Load" discards the unsaved conversation

Open Beginner friendly
#11 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
desktop

Research direction

Start in src/chatty/ui/app.py at ChatApp._save_then_load around line 555 and trace how the cancelled rename prompt passes None. Check the related session-load behavior or tests if available. Done means cancelling the prompt leaves the current conversation in place and does not load the pending session.

Written by the indexing model from the issue text.

Description

area: sessions bug data-loss

When the user has unsaved changes and loads another session, choosing "Save & Load" opens SessionRenameModal for a name. ChatApp._save_then_load (src/chatty/ui/app.py:555) is called with None when that prompt is cancelled (Escape or the Cancel button), but it only skips the save:

if name:
    handle_first_save(self, name)
if pending_path:
    handle_session_load(self, pending_path)

Effect: the user chose to save, changed their mind about the name, and pressed Escape. The other session loads anyway, and the unsaved conversation is lost without being saved.

Fix: when name is None, cancel the whole action and leave the current conversation in place.

Dominant language
Python
Stars
0
Forks
2
Avg merge
1d 4h
Merged PRs (30d)
13

Getting set up

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.

More from lanl/chatty

All issues in lanl/chatty

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.