backnotprop / backnotprop/plannotator

Keep Ask AI chat history when switching files in folder annotation mode

Open
#1,001 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8.7k
Forks
649
Avg merge
11h 12m
Merged PRs (30d)
109

Description

## Context

I use Plannotator's `annotate ` workflow to review and discuss a set of related files in one local browser session.

This works well for annotations: I can switch between files, leave comments, and later send the collected feedback. However, the right-side Ask AI discussion behaves differently.

## Current behavior

In folder annotation mode:

1. Open a folder with `plannotator annotate ./some-folder/`.
2. Open file A from the Files panel.
3. Ask questions in the right-side AI panel.
4. Switch to file B from the Files panel.

The AI panel conversation/history is cleared or reset when the active file changes.

## Expected behavior

Switching files should not clear or reset the right-side AI discussion history.

Ideally, the user should be able to keep one continuous AI conversation while moving through files in the same annotate-folder session. The active file can still be included as context for each new question, but the chat history itself should remain stable and visible across file switches.

A useful behavior would be:

- The AI sidebar keeps the existing conversation when switching files.
- New questions include the currently active file / selected text as context.
- Existing messages remain visible, optionally tagged with the file that was active when the question was asked.
- If a full cross-folder chat is too broad, an alternative would be per-file chat history that is restored when switching back to a file, rather than being lost.

## Why this matters

For multi-file document/spec review, the discussion often spans more than one file. Clearing the AI panel on every file switch makes it hard to:

- compare related content across files,
- keep context while reviewing a file group,
- turn AI answers into final annotations later,
- avoid copying notes outside Plannotator just to preserve the discussion.

Annotations already survive file switches, so it would be more intuitive if the AI discussion history also did not jump or disappear just because the selected file changed.

## Environment

Observed with Plannotator `0.21.4` in folder annotation mode on macOS. I checked the recent `0.22.0` release notes and did not see this behavior called out as changed.

Contributor guide

Open the contributing guide

Research direction

Start with the folder annotation entry point, `plannotator annotate ./some-folder/`, and trace how Files panel switches update the right-side Ask AI panel. Reproduce the reset in folder annotation mode on the stated workflow. Done means the conversation remains visible across file switches while new questions still use the active file or selected text as context.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.