Skip to content

Add a paper Q&A pane with saved sessions and reasoning controls - #38

Open
CatIIIIIIII wants to merge 3 commits into
PapilotAI:mainfrom
CatIIIIIIII:feat/paper-questions
Open

CatIIIIIIII wants to merge 3 commits into
PapilotAI:mainfrom
CatIIIIIIII:feat/paper-questions

Conversation

@CatIIIIIIII

@CatIIIIIIII CatIIIIIIII commented Nov 4, 2026 •

Copy link
Copy Markdown

What and why

Authors need to ask about a paper without starting an editing task. Add a separate Paper Q&A pane below the editing composer and task conversation, with a resizable divider and the existing agent/model/effort picker.

  • Start conversations with the plus button and return to earlier sessions through the clock icon menu. Each history entry has a delete action with confirmation, failure retry and draft cleanup. Running answers cannot be deleted; removing the active conversation selects another or creates a fresh empty session. Questions and answers are stored in SQLite, scoped to paper, viewer and session; local drafts and model/effort choices survive switching sessions and reloads.
  • Give each answer a bounded snapshot of the current manuscript and recent completed turns. Reuse the configured Codex, Claude or GLM runtime; allow web lookup and preserve the chosen reasoning effort on retries.
  • Deduplicate requests, keep failed questions retryable, recover interrupted questions after restart, and hold project operations while an answer is running.

Permission behavior: Q&A displays a Full access indicator and runs directly in the selected paper directory. Codex uses danger-full-access with approvals disabled; Claude/GLM use the full-access adapter path, including commands, file tools, configured settings and network access. Requested edits therefore affect the current manuscript directly and do not go through an editing task's review worktree. OS-level permissions still apply. Read-only title/review helpers retain their existing restrictions.

History is managed by Papilot and passed as recent-turn context to ephemeral agent calls; it is not a terminal Claude session.

Separate paper question and editing panes

Select previous conversations with the clock menu

This PR is independently based on main (0.8.9). It does not require #36 (note editing) or #37 (compact slider). Keep conversation following synchronized before scroll events from the shorter pane can disable it. Existing browser fixtures now answer the new Q&A endpoints and target the upper composer explicitly where necessary.

Delete individual history sessions

Confirm conversation deletion

How it was checked

  • npm run typecheck
  • node node_modules/vite/bin/vite.js build
  • 29 tests: node --import tsx --test tests/agents.test.ts tests/agent-picker.test.ts tests/paper-question-agent.test.ts tests/paper-question-routes.test.ts tests/paper-question-sessions.test.ts tests/paper-questions.test.ts
  • node scripts/check-paper-questions.mjs — independent composition, model/effort selection, history, session switching, retry, draft persistence, divider input, deletion confirmation/cancel/retry, session fallback, draft cleanup, desktop/mobile.
  • node scripts/check-ui.mjs — including Git menus, task lifecycle, responsive layouts and long-conversation following.
  • node scripts/check-note-selection.mjs
  • node scripts/check-task-model.mjs
  • node scripts/check-appearance.mjs
  • node scripts/check-attachments.mjs
  • Full npm test and aggregate npm run test:ui were not run; the checks above were run individually.

Screenshots use a synthetic PDF and mocked answers. The image files are hosted on a separate branch; generated builds and DMGs are excluded from this PR.

Let authors ask about the current manuscript alongside editing tasks. Persist per-viewer conversations, expose history through a clock menu, and reuse model and reasoning-effort controls. Enable full-access tool use and web lookup in the selected paper directory. Cover session isolation, retries, permissions, effort, and split-pane browser interactions.
Add per-session delete controls with confirmation and retry. Remove only the current viewer history, block deletion while answering, clear local drafts, and select a remaining or fresh conversation without reviving deleted default sessions.

This branch has not been deployed

No deployments
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