Skip to content

Support # document references in the plan editor's Ask AI #1556

Open

Description

@paullizer

Summary

Part of #1543 (Track A2). Let users # reference documents and tags in the orchestration plan editor's Ask AI, so a revised plan can use them. The same server authorizer serves the workflow assistant in Phase 3.

User Value

When revising a plan, users often want to say "also check this against #policy-doc". Today they have to leave the editor and start over. The normal composer's # picker already works well, so the plan editor should offer the same thing.

Proposed Behavior

  • Picker: reuse the normal composer's # picker (searchContextCandidates() in lib/contextMentions.ts:208-275, DocumentPickerPopover, ContextChips, and keyboard navigation in ComposerEditor.tsx:429-480) through A1's restricted ComposerEditor mode.
  • Server: factor a scope-only reference authorizer out of resolve_elicitation_references (functions_orchestration_context.py:346), which today requires an owned conversation. Surfaces without a conversation, such as the workflow editor, accept only personal, group and public documents and tags, never chat attachments. The elicitation path stays exactly as it is.
  • Plan editor: # references in Ask AI flow into the plan's seeds through merge_elicitation_context, which is already used for editor-scoped questions (functions_orchestration_plan_editing.py:354-372).
  • Not planned: the diagram, chart and image editors edit an artifact, so they don't get # references.

Acceptance Criteria

  • A user can # a document in the plan editor's Ask AI, and the revised plan uses it.
  • Unauthorized or stale references are rejected with a clear message.
  • The orchestration question card behaves exactly as before.
  • Functional tests for the scope-only authorizer (including rejection of chat attachments), Playwright coverage of the plan editor picker, release notes and config.py version.

Notes

Activity

  1. moved this from In progress to In review in Simple Chat Roadmapon Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1Priority 1: urgent, address before P2 workenhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions