Skip to content

fix(ui): enable Visual layout mode on Search results page#1686

Merged
secondl1ght merged 4 commits intodevfrom
bug-ui/1598-visual-mode-search-returns
Apr 11, 2026
Merged

fix(ui): enable Visual layout mode on Search results page#1686
secondl1ght merged 4 commits intodevfrom
bug-ui/1598-visual-mode-search-returns

Conversation

@Orlandohub
Copy link
Copy Markdown
Contributor

Supersedes #1657 (same changes; head branch renamed to bug-ui/1598-visual-mode-search-returns).

Summary

Fixes #1598 — Visual mode was missing from the Search results page. Users could not filter search results using Visual layout, and navigating from Visual mode on Home to Search would silently fall back to Columns.

Changes

Root cause

Three blocking points prevented Visual mode on Search:

  1. TIMELINE_FEED_VARIANT.SEARCH was not in VISUAL_SUPPORTED_FEED_VARIANTS, so resolveFeedLayout always fell back to Columns
  2. The Search template did not pass feedVariant to ContentLayout, so the wide shell layout never activated
  3. The Search template did not pass allowVisualLayout to sidebar/drawer components, so the Visual tab was hidden

Fix

  • useFeedLayoutResolution.ts — Added SEARCH to VISUAL_SUPPORTED_FEED_VARIANTS
  • Search.tsx — Pass feedVariant={TIMELINE_FEED_VARIANT.SEARCH} to ContentLayout and allowVisualLayout to all three sidebar/drawer components
  • TimelineFeed.tsx — Added visual content resolution + sync in SearchTimelineFeed (same pattern as Home/Bookmarks), coercing unsupported content types (short/long/links/files) to all when Visual is active
  • TimelineFeedVisual.helpers.ts — Added SEARCH to VISUAL_INTERACTIVE_CONTENT_VARIANTS to enable content coercion
  • useSearchStreamId.ts — Added optional contentOverride parameter so SearchTimelineFeed can pass the resolved content directly, avoiding a one-render lag with unsupported content types
  • useFeedLayoutResolution.test.ts — Updated test that used SEARCH as an "unsupported" variant (now uses HOT), added new test confirming SEARCH supports Visual

cursoragent and others added 3 commits April 7, 2026 23:16
Add SEARCH to VISUAL_SUPPORTED_FEED_VARIANTS and
VISUAL_INTERACTIVE_CONTENT_VARIANTS so the visual grid renders for
search results. Pass feedVariant and allowVisualLayout through the
Search template to expose the Visual tab in sidebar filters and
activate the wide shell layout. Wire up visual content resolution
and sync in SearchTimelineFeed, and add a contentOverride parameter
to useSearchStreamId to avoid a one-render lag with unsupported
content types.

Refs: #1598
@Orlandohub Orlandohub requested a review from secondl1ght April 10, 2026 10:17
@Orlandohub Orlandohub self-assigned this Apr 10, 2026
@Orlandohub Orlandohub added the 🐞 bug Something isn't working label Apr 10, 2026
@Orlandohub Orlandohub added this to the Prague - 2026 milestone Apr 10, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

🚀 Preview Deployment

URL: https://franky-preview-pr-1686-fzxmjul7ya-oa.a.run.app

franky-preview-pr-1686ee8981b

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 10, 2026

Greptile Summary

This PR enables Visual layout mode on the Search results page by applying the same three-layer pattern already used by Home and Bookmarks: adding SEARCH to the supported variant sets, wiring allowVisualLayout and feedVariant through to the sidebar/drawer components, and adding content coercion + stream-id override in SearchTimelineFeed. The implementation is a faithful port of the existing Home/Bookmarks patterns with appropriate test coverage.

Confidence Score: 5/5

This PR is safe to merge — it's a clean port of the existing Home/Bookmarks Visual mode pattern applied to Search, with no architectural violations or logic errors.

All changes follow the established three-layer pattern (layout resolution → content coercion → stream-id override), the test suite is correctly updated, and no P0/P1 issues were found.

No files require special attention.

Important Files Changed

Filename Overview
src/hooks/useFeedLayoutResolution/useFeedLayoutResolution.ts Adds SEARCH to VISUAL_SUPPORTED_FEED_VARIANTS — minimal, correct change.
src/components/organisms/Timeline/Feed/TimelineFeed/TimelineFeedVisual.helpers.ts Adds SEARCH to VISUAL_INTERACTIVE_CONTENT_VARIANTS to enable content coercion; no issues.
src/components/templates/Feed/Search/Search.tsx Passes feedVariant and allowVisualLayout to ContentLayout and all three sidebar/drawer components — mirrors the Home template correctly.
src/components/organisms/Timeline/Feed/TimelineFeed/TimelineFeed.tsx SearchTimelineFeed gains resolveVisualFeedContent + useSyncInteractiveVisualContent, matching the Home/Bookmarks pattern exactly.
src/hooks/useSearchStreamId/useSearchStreamId.ts Adds an optional contentOverride param to avoid a one-render lag; backward-compatible and clearly documented.
src/hooks/useFeedLayoutResolution/useFeedLayoutResolution.test.ts Updates the unsupported-variant test to use HOT and adds a new test confirming SEARCH supports Visual — correct and complete.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User selects Visual layout] --> B[useFeedLayoutResolution\nSEARCH variant]
    B --> C{VISUAL_SUPPORTED_FEED_VARIANTS\ncontains SEARCH?}
    C -- Yes --> D[isVisualActive = true]
    C -- No --> E[effectiveLayout = COLUMNS]
    D --> F[SearchTimelineFeed\nresolveVisualFeedContent]
    F --> G{content in\nVISUAL_DISABLED_CONTENT?}
    G -- Yes --> H[coerce to 'all']
    G -- No --> I[keep original content]
    H --> J[useSyncInteractiveVisualContent\nupdate store]
    I --> J
    H --> K[useSearchStreamId\ncontentOverride = 'all']
    I --> L[useSearchStreamId\ncontentOverride = content]
    K --> M[Stream ID with overridden content]
    L --> M
    M --> N[TimelineFeedWithStream\nVisual grid rendered]
Loading

Reviews (1): Last reviewed commit: "Merge branch 'dev' into cursor/windows-a..." | Re-trigger Greptile

@secondl1ght secondl1ght enabled auto-merge April 10, 2026 22:35
Copy link
Copy Markdown
Member

@secondl1ght secondl1ght left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified via the preview URL and appears to work as expected.

I found an unrelated bug during testing though. The Wide layout on the Search page is currently broken, this is on production right now. You can see it at the end of my demo video. I will put in a another PR to fix this.

Screencast.from.2026-04-10.19-58-32.webm

@secondl1ght secondl1ght added this pull request to the merge queue Apr 11, 2026
Merged via the queue into dev with commit 83a355b Apr 11, 2026
14 checks passed
@secondl1ght secondl1ght deleted the bug-ui/1598-visual-mode-search-returns branch April 11, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Visual Mode missing from Search returns

3 participants