Skip to content

ADFA-6247 | Export and import chats as .txt - #110

Open
jatezzz wants to merge 1 commit into
mainfrom
feat/ADFA-6247-export-import-chats-txt
Open

jatezzz wants to merge 1 commit into
mainfrom
feat/ADFA-6247-export-import-chats-txt

Conversation

@jatezzz

@jatezzz jatezzz commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Implemented the ability to export and import Agent conversations as plain .txt files. This ensures users can back up important chats, share them with teammates, or continue conversations across different devices. To support the UI requirements, the standard options menu was replaced with a custom Material 3 menu.

Details

  • Added an Export option to the chat row options menu (⋮), saving transcripts locally via the system file picker.
  • Replaced the "New chat" button with a + menu that contains both New chat and Import chat.
  • Created the ChatTranscript model to handle strict parsing, ensuring imported chats accurately retain senders, timestamps, and order while assigning fresh IDs to prevent overwriting existing chats.
  • Updated ChatFragment with ActivityResultContracts to handle system file picker intents for creating and opening documents.
Screen_Recording_20260925_151127_Code.on.the.Go.mp4

Ticket

ADFA-6247

Observation

The standard PopupMenu was replaced with a custom SidebarPopupMenu because the host's tooltip relies on a PopupWindow. Anchoring a tooltip inside a standard popup menu throws a BadTokenException that crashes the IDE. The custom menu safely handles long-press tooltips and supports displaying disabled state explanations, such as when attempting to export an empty chat.

Chat row menu: Rename, Export, Delete; Export saves via the system file picker and is dimmed for an empty chat.
The + menu adds Import chat, which opens an exported file as a new chat.
Transcript I/O runs in ChatViewModel off the main thread; menus are a shared Material 3 popup that TalkBack can read.
@jatezzz
jatezzz requested review from a team, Daniel-ADFA and itsaky-adfa September 25, 2026 20:39
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