Pop-out chat windows

Aperta
#233 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust, tauri, typescript
Ambito
desktop, frontend

Direzione di ricerca

Read apps/desktop/src/lib.rs (ensure_auxiliary_windows), apps/desktop/ui/src/main.tsx and state/DaemonContext; comment with a proposal for connecting a second window to the daemon before starting. The issue calls for a design note covering authentication, subscriptions, approval handling, drafts and window behavior, followed by shell, UI, settings and test slices. Done means meeting the listed acceptance criteria, including i18n checks, lint, typecheck, UI tests, clippy and a manual OS check.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: desktop-ui enhancement help wanted needs design

size: M · first-timer: no

Please comment before starting so we can agree on the design. Two windows must not both act on the same approval, and how a second window gets its state needs to be agreed first.

Summary

Pop-out chat windows: open a chat in its own window (for example on a second monitor) while the main window keeps working, from the chat header or the sidebar context menu.

Why it matters

People watch a long run on one screen and work on another, or keep one bot's chat visible while talking to a second bot. Today there is one main window, so following two chats means switching back and forth.

Current state

  • The Tauri shell (apps/desktop/src/lib.rs) creates the main window (tauri.conf.json), a transparent overlay window per monitor and a mini "widget" window; the extra windows are loaded as index.html?window=overlay|widget, and apps/desktop/ui/src/main.tsx chooses what to render from that query. There is no window for a chat.
  • UI state lives in the stores and contexts of the one web view (state/DaemonContext, the timeline and run ledger under apps/desktop/ui/src/state/). The daemon is the source of truth and the UI subscribes to its event stream, so a second web view can open its own subscription instead of sharing memory.
  • Approvals and questions are answered through the daemon (POST approve/answer); the daemon accepts one decision per request, but the UI today assumes a single window showing each card.
  • Window capabilities and permissions are declared per window label in the Tauri configuration.

Proposal and suggested approach

Settle in a design note: how a pop-out window authenticates and subscribes (its own connection to the daemon, the same owner-key handling as the main window), which window shows approval cards when both show the same chat (proposal: both show it, the first decision wins, the other updates to "decided in another window"), what happens to the composer draft, how the window's position and size are remembered, and what closing the last window does (tray behaviour as today).

Slices:

  1. Shell: open a window with label chat-<id> and the chat id in the query; capability entry for that label pattern; focus an existing window instead of opening a second one for the same chat.
  2. UI: a compact chat-only layout (no sidebar), reusing the existing chat view and run controls; the Stop button and approvals behave exactly as in the main window.
  3. Settings and menu entries: "Open in new window" in the chat header and the sidebar menu; English and Turkish strings; keyboard access.
  4. Tests: window-label helpers, the "decided elsewhere" card state, and a mock-mode path (?mock=1&window=chat&id=...) so it can be developed without the shell.

Acceptance criteria

  • A chat can be opened in a second window and both windows show the same live run; stopping or approving in one updates the other.
  • A double approval attempt is handled gracefully (no duplicate side effect, a clear message).
  • Reopening an already popped-out chat focuses its window.
  • check:i18n, lint, typecheck, UI tests, cargo clippy -p desktop (the Tauri crate) and a manual check on at least one OS.

Out of scope

Tabs, tiling inside the app, detaching other panels (bot panel, live viewer), and a separate window for approvals only.

How to get started

Read apps/desktop/src/lib.rs (ensure_auxiliary_windows), apps/desktop/ui/src/main.tsx and state/DaemonContext. Comment here with how you would connect the second window to the daemon.

Lingua principale
Rust
Stelle
0
Fork
1
Merge medio
6h 54m
PR unite (30g)
152

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di emreocell/Praxi-Bot

Tutte le issue di emreocell/Praxi-Bot

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.