Skip to content

feat: project visibility, scratch-chat, and session header controls#27

Merged
setkyar merged 9 commits into
mainfrom
feat/session-header-controls
Jun 1, 2026
Merged

feat: project visibility, scratch-chat, and session header controls#27
setkyar merged 9 commits into
mainfrom
feat/session-header-controls

Conversation

@setkyar
Copy link
Copy Markdown
Contributor

@setkyar setkyar commented Jun 1, 2026

Summary

  • Project visibility: add a Manage Projects modal with an opt-in allowlist master switch and backend projects endpoints (internal/server/projects.go) plus index-page filtering UI.
  • Scratch chat (btw): add a floating realtime scratch-chat popup with SSE sync (internal/server/btw.go, web/src/session/live/btw-popup.js), and a git footer in the composer.
  • Session header controls: move tree-collapse and new-session actions into the session header, add a mobile sidebar close button, and align the three bottom bars to a shared height.
  • Cleanup: remove the redundant "tap to view" update indicator and tidy nord/dracula user-message background tokens.

Testing

  • make test (vitest + go test) — Not run (not requested)

setkyar added 9 commits June 1, 2026 16:29
Only show enabled projects on the homepage. Preferences persist server-side
in a new project_prefs SQLite table: first run seeds every project enabled,
projects discovered later default to hidden, and folders can be registered to
pre-approve them. Adds GET/POST /api/projects (list, enable/disable, register,
remove, bulk enable-all/disable-all) and a Manage Projects modal with search,
select/deselect-all, and per-project toggles. Fixes WCO drag-region swallowing
clicks on top menu items.
Add a "Filter projects" toggle (app_settings.project_filter_enabled, default
off) to the Manage Projects modal. While off, every project and session shows
and new sessions appear immediately like before; when on, the homepage is
restricted to enabled projects (allowlist). Removes the auto-enable-on-create
hack now that the default no longer hides anything. Adds enable-filter/
disable-filter actions and a filterEnabled flag to /api/projects.
Switch project rows from CSS grid to flexbox with explicit order so they no
longer overflow horizontally or misplace the checkbox on mobile WebKit. Add
overflow guards to the modal/list so the search box fits, let the list scroll
within the sheet while the filter switch and register footer stay fixed, and
clean up the Add button styling.
The transient toast duplicated existing behavior: auto-scroll when
following and the persistent follow button when scrolled up already
cover new-entry notifications.
Adds a draggable, resizable "btw" chat window opened from the composer's
bottom action bar. It is backed by a single global pi session persisted in
sqlite (app_settings), so the conversation survives reloads and stays in
sync across every device in realtime.

- Backend: GET /api/btw + POST /api/btw/new endpoints; a btw-changed SSE
  event broadcast on the global topic so open windows re-sync when the
  pointer changes on another device.
- Frontend: native mini-chat with markdown + tool-call rendering, a runcat
  working spinner, and a send button that turns into a cancel control while
  the worker is running.
- The action bar is now always visible (not just in git repos) so btw is
  reachable everywhere; git controls hide themselves when the cwd is not a
  repo.
- Mobile: btw does not auto-reopen and steps aside when the main composer
  is focused, and streaming content wraps instead of overflowing.
The .pi-git-branch rule sets display:inline-flex, which overrode the
[hidden] attribute (equal specificity, author rule wins), so the branch
icon + rename pencil stayed visible in non-git directories even though the
hidden attribute was set. Add a .pi-git-branch[hidden] override, matching
the existing pattern used for .pi-git-bar, .pi-git-caret, etc.
The left tree-status, middle git/btw action bar, and right scratchpad
footer each had different paddings/heights, so their top divider lines
landed at different vertical positions across the columns. Give all three a
shared --session-footer-h with vertically-centered, border-box content so
the bottom divider reads as one continuous line.
Move the tree-collapse and new-session controls into the session header,
add a sidebar close button for mobile, and tweak user-message backgrounds
for nord/dracula themes.
@setkyar setkyar merged commit a667ddd into main Jun 1, 2026
1 check passed
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