Skip to content

Fix #28: Feature request: viewing mode#37

Open
JiwaniZakir wants to merge 1 commit intohosenur:mainfrom
JiwaniZakir:fix/28-feature-request-viewing-mode
Open

Fix #28: Feature request: viewing mode#37
JiwaniZakir wants to merge 1 commit intohosenur:mainfrom
JiwaniZakir:fix/28-feature-request-viewing-mode

Conversation

@JiwaniZakir
Copy link
Copy Markdown

Closes #28

Adds a view mode toggle to SessionPage in apps/web/src/routes/_app/session/$id.tsx that hides the message input bar for a distraction-free reading experience.

Changes

apps/web/src/routes/_app/session/$id.tsxSessionPage function

  • Added viewingMode boolean state (initialized to false) alongside existing state declarations near line 682.
  • Refactored the bottom toolbar div (previously border-t border-border p-4 shrink-0 relative) into a conditional: when viewingMode is true, renders a minimal strip with only an "Exit view mode" button (IconEye + label, text-xs, right-aligned); when false, renders the full composer including FileMentionPopover, the input form, AgentSelect, and model controls inside a nested div.p-4.relative.
  • Added a "View mode" button (IconEye, text-xs, text-muted-fg) inside the AgentSelect row that sets viewingMode to true.

Motivation

Users reading through past sessions were forced to scroll with the full message input bar occupying bottom space. The view mode collapses that entire panel, leaving only a small exit affordance so users can return to composing without a page reload or navigation.

Testing

  1. Open any existing session with a message history.
  2. Click the View mode button in the toolbar next to AgentSelect — confirm the composer, file mention popover, model selector, and send controls disappear.
  3. Confirm the bottom bar shrinks to a single right-aligned Exit view mode button.
  4. Click Exit view mode — confirm the full composer is restored and functional (typing, sending a message).
  5. Verify no layout shift or overflow occurs in the message list when toggling between modes at various viewport widths.

This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 5, 2026

@JiwaniZakir is attempting to deploy a commit to the hosenur's projects Team on Vercel.

A member of the Team first needs to authorize it.

@JiwaniZakir
Copy link
Copy Markdown
Author

The conditional rendering approach works, but consider persisting viewingMode to localStorage so the preference survives navigation — users reading long sessions will likely want it to stay on when they switch between sessions. Also, IconEye is being used for both entering and exiting view mode, which could be confusing; using IconEyeOff for the "Exit view mode" button would make the toggle state clearer.

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.

Feature request: viewing mode

1 participant