Skip to content

feat(search): visual web search — floating photos, article card & reader - #5

Merged
nirhemo merged 2 commits into
mainfrom
feat/visual-search
Jul 8, 2026
Merged

feat(search): visual web search — floating photos, article card & reader#5
nirhemo merged 2 commits into
mainfrom
feat/visual-search

Conversation

@nirhemo

@nirhemo nirhemo commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Turns web search into a visual experience on the HUD.

What it does

  • Floating related photos — when ATLAS searches, the top ~6 images (DuckDuckGo image search) float around the HUD; click any to open its source. They clear/replace on the next turn.
  • Article card — the top result renders as a floating card: hero image, title, summary, Open article ↗, and a TLDR button.
  • Read / summarize on request — a new read_article tool fetches the page and extracts its main text (via lxml), so ATLAS can summarize, TLDR, or read it aloud. The card's TLDR button and a voice ask ("TLDR that") both route through it; with no URL it defaults to the last search's top article.

How it's wired

  • web_search.rich(query) returns {text, images, article}. The model still gets the plain text (with source URLs to cite); the ToolBox stashes the visuals in last_media.
  • router.chat() clears last_media each turn and returns it as media in the /api/chat response.
  • The frontend renderSearchMedia(media) draws the floating photos + article card; a non-search turn (media: null) clears them.

No new dependencies — ddgs.images() and lxml were already installed.

Verification

  • 42 tests passing offline (+5 new: extraction, rich shaping, tool wiring).
  • Headless-rendered (Playwright): 6 floating photos + article card render, TLDR button present, cleared on the next turn — no console/page errors.

🤖 Generated with Claude Code

nirhemo and others added 2 commits July 8, 2026 14:12
…ader

When ATLAS searches the web, the HUD now shows the results visually:
- web_search returns RICH results (related images + top article) threaded to the
  frontend via the chat response (router adds `media`; ToolBox stashes it, cleared
  each turn).
- Floating related photos scatter around the HUD (click to open the source),
  replaced/cleared on the next turn.
- A rich article card for the top result: hero image, title, summary, Open + TLDR.
- New `read_article` tool: fetches + extracts a page's main text (lxml) so ATLAS
  can summarize / TLDR / read it aloud on request ("TLDR that"). The card's TLDR
  button and a voice request both route through it.

No new dependencies (ddgs images + lxml already present).
Tests: 42 passing offline (+5). Headless-rendered: 6 photos + card, no console errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…reader)

CI installs a clean env and had neither — ddgs was a pre-existing undeclared
runtime dep for web search; lxml is needed by the new read_article extractor.
Fixes the CI failure on test_web_search::test_extract_text (lxml missing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nirhemo
nirhemo merged commit 9a201e1 into main Jul 8, 2026
3 checks passed
@nirhemo
nirhemo deleted the feat/visual-search branch July 8, 2026 12:12
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