Skip to content

feat(timeline): ask the assistant about a feed item from the item - #588

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-7zvtv3
Oct 18, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-7zvtv3

Conversation

@adeelahmad

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: to talk to the assistant about something on the Timeline you had to open the chat and describe the item yourself, or highlight its text.

After: an opened item has Ask about this, and a on a line does the same (every item of a grouped line). The chat beside the page opens with the item as what the question is about: its id, kind, time, who did it, its line, where it opens and its fields. You type the question and press Enter.

How: the page chat listens for a lens:ask-about window event (askAbout() in page-chat-model.ts) and opens with that text as the highlighted part, so it reuses the existing page-context path. The server already wraps that path as untrusted data (chat.with_context). askQuote() in timeline/model.ts builds the text, keeping whole items up to 4,000 characters. Because the id is included, "mark it important" works through the assistant's existing mark_activities tool.

Motivation and Context

This is the queued feature "Talk to the agent from a feed item". @lens inside a comment is a separate feature, owned by the Activity stream thread (#570 and the PR after it). This PR doesn't touch that work.

Types of changes

  • Bug fix
  • New feature (non-breaking change which adds functionality)
  • Breaking change

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project.
  • I added or updated tests (timeline-ui.test.tsx, page-chat.test.tsx).
  • I updated docs/ (timeline.md "Asking about an item", assistant.md).
  • Changelog fragment: changelog.d/ask-about-timeline-item.md.

Local CI (ci/local-ci.sh --jobs frontend,pre-commit,title) on 182030f: Next.js pass, pre-commit pass, PR title pass.

Done questions

  • Goal: you can talk to the assistant from any feed item; it merges on green CI.
  • Agents: agents already read the same items over MCP/API (timeline) and act on them by id (mark_activities). This PR adds the person-side entry point.
  • Zero setup: no new prerequisite.
  • Fewest clicks: one click or one key, then the question and Enter.
  • Configurable: n/a, no new settings.
  • Light: frontend only, no new dependencies.
  • Private and secure: the item's text goes to the model through the existing highlighted-text path, which wraps it as untrusted. No new surface, so the threat model is unchanged.
  • Cost: no model call until the person asks. That call is logged in the ledger like any other chat answer.
  • User decides: nothing happens until it's used, and defaults are unchanged.
  • Upgrades: n/a, no stored data changes.
  • Honest: docs/timeline.md lists it as built. Refine-later items are written down.
  • Tests and docs updated, with a row in docs/requirements.md. No generated files are affected.
  • Open: no new dependencies.
  • Reported: in the project thread. Refine later: ask from the full Chat too, and keep a link back to the item on the question.
  • Reuse: reuses the page chat and its highlighted-text context instead of adding a new API.

Generated by Claude Code

An opened timeline item has "Ask about this", and `a` on a line does the same:
the chat beside the page opens with the item's id, line, time, link and fields
as what the question is about (sent as the highlighted part, so the model reads
it as data). The page chat listens for a lens:ask-about event that any page's
own buttons can send.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5D9UGwJBfue5FU8tL27aF
@adeelahmad adeelahmad self-assigned this Oct 18, 2026
@adeelahmad
adeelahmad merged commit d2aed3d into main Oct 18, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-7zvtv3 branch October 18, 2026 12:00
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.

2 participants