idea: tui needs a way to open an existing project and switch projects #28

Closed
opened 2026-07-15 18:25:55 +00:00 by hugo · 1 comment
Owner

currently only the default project is shown. but there must be a way to open an existing project with a proper folder picker that supports entering a valid path and to switch between different projects in the caching database. when a new project is added, a rebuild of the database must be automatically triggered.

currently only the default project is shown. but there must be a way to open an existing project with a proper folder picker that supports entering a valid path and to switch between different projects in the caching database. when a new project is added, a rebuild of the database must be automatically triggered.
hugo added the idea label 2026-07-15 18:25:55 +00:00
Author
Owner

Implemented in 5801e49.

The TUI now has a projects overlay on p (sidebar focus):

  • Lists all projects from the caching database with the active one marked; enter activates the selected project via BDS.Projects.set_active_project and reloads the sidebar.
  • o opens a folder-path prompt. A typed path is validated to be an existing directory, then opened as a project (BDS.Projects.create_project with data_path, named after the folder) and activated — same backend flow as the GUI's Open Existing Blog.
  • Opening a folder automatically queues the full rebuild_database pipeline through the shared shell-command backend, with progress in the TUI status line via the existing task polling.
  • Invalid paths keep the prompt open and report the error; esc steps back to the list / closes the overlay.

Covered by tests in test/bds/tui_test.exs (projects overlay describe block), spec updated in specs/tui.allium (rule ProjectSwitcher, allium check clean), translations added for de/fr/it/es. Build, full test suite, credo, deps.audit and dialyzer are all clean.

Implemented in 5801e49. The TUI now has a projects overlay on `p` (sidebar focus): - Lists all projects from the caching database with the active one marked; enter activates the selected project via `BDS.Projects.set_active_project` and reloads the sidebar. - `o` opens a folder-path prompt. A typed path is validated to be an existing directory, then opened as a project (`BDS.Projects.create_project` with `data_path`, named after the folder) and activated — same backend flow as the GUI's Open Existing Blog. - Opening a folder automatically queues the full `rebuild_database` pipeline through the shared shell-command backend, with progress in the TUI status line via the existing task polling. - Invalid paths keep the prompt open and report the error; esc steps back to the list / closes the overlay. Covered by tests in test/bds/tui_test.exs (projects overlay describe block), spec updated in specs/tui.allium (rule ProjectSwitcher, allium check clean), translations added for de/fr/it/es. Build, full test suite, credo, deps.audit and dialyzer are all clean.
hugo closed this issue 2026-07-16 15:26:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hugo/bDS2#28