Problem description
After removing a folder from the workspace on the desktop app, the FOLDERS tab in the Android app still shows that folder (tapping it shows it empty or stale). Keeping it in the CHATS tab (where sessions are grouped by folder) is acceptable, but the FOLDERS tab acts as a project list and should not show folders that are no longer in the workspace.
Steps to reproduce
- Desktop codeg: remove a folder from the workspace (right-click -> Remove from workspace, or via workspace settings).
- Open the Android app and go to the FOLDERS tab.
- The removed folder still appears in the list.
Root cause
- Server side:
remove_folder_from_workspace_core (src-tauri/src/commands/folders.rs) does not delete the record. It only calls set_folder_open(false) — the record is kept intentionally so session/folder association can be resolved by id.
list_all_folder_details (src-tauri/src/db/service/folder_service.rs) filters only by deleted_at, not by is_open (the comment in code says this is intentional, to keep resolving active sessions by folder id).
- Android client: both the CHATS and FOLDERS tabs call
listFolders() (= list_all_folder_details). The client already has listOpenFolders() (= list_open_folder_details, which only returns is_open = true) but it is only used in the folder picker when creating a new session.
Suggested fix
- FOLDERS tab: use
listOpenFolders() instead of listFolders() (one-line change).
- CHATS tab: keep as-is (grouping history sessions by folder is reasonable behavior).
Environment
- codeg Android client (latest)
- codeg desktop latest
Problem description
After removing a folder from the workspace on the desktop app, the FOLDERS tab in the Android app still shows that folder (tapping it shows it empty or stale). Keeping it in the CHATS tab (where sessions are grouped by folder) is acceptable, but the FOLDERS tab acts as a project list and should not show folders that are no longer in the workspace.
Steps to reproduce
Root cause
remove_folder_from_workspace_core(src-tauri/src/commands/folders.rs) does not delete the record. It only callsset_folder_open(false)— the record is kept intentionally so session/folder association can be resolved by id.list_all_folder_details(src-tauri/src/db/service/folder_service.rs) filters only bydeleted_at, not byis_open(the comment in code says this is intentional, to keep resolving active sessions by folder id).listFolders()(=list_all_folder_details). The client already haslistOpenFolders()(=list_open_folder_details, which only returnsis_open = true) but it is only used in the folder picker when creating a new session.Suggested fix
listOpenFolders()instead oflistFolders()(one-line change).Environment