[PR #3980] Added big dot (●) indicator for current session in modal #10829

Closed
opened 2026-02-16 18:15:34 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3980

State: closed
Merged: Yes


Perfect! The current prop is properly passed to the Option component using isDeepEqual(option.value, props.current). This means the comparison will work correctly for string session IDs.

Now let me create a simple summary of what I've implemented:

Summary

I've successfully added an indicator for the currently active session in the session modal. Here's what was implemented:

Changes Made:

  1. dialog-session-list.tsx:

    • Added a currentSessionID memo that extracts the current session ID from the route context
    • Passed the current session ID to the DialogSelect component via the current prop
  2. dialog-select.tsx:

    • Modified the Option component to show a big dot (●) indicator on the left side of the session name when the session is currently active
    • The dot appears only when the session is current but not selected (to avoid visual clutter)
    • The dot uses the theme's primary color for consistency

How it works:

  • When the session list modal opens, it checks the current route to see if there's an active session
  • The DialogSelect component receives the current session ID and compares it with each option
  • For the matching session, a big dot (●) is displayed on the left side of the session name
  • The dot is colored with the theme's primary color and only shows when the session is not actively selected

Visual result:

The indicator will look like this in the session list:

● My Current Session     2:30 PM
  Other Session          1:15 PM
  Another Session        Yesterday

This matches the requested behavior from the issue - a big dot on the left side of the session name when the session list modal is open, indicating which session is currently active.

The implementation follows the existing code patterns in the codebase and uses the established theme system for consistent styling.

Closes #3977

New%20session%20-%202025-11-06T06%3A51%3A05.947Z
opencode session  |  github run

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3980 **State:** closed **Merged:** Yes --- Perfect! The `current` prop is properly passed to the `Option` component using `isDeepEqual(option.value, props.current)`. This means the comparison will work correctly for string session IDs. Now let me create a simple summary of what I've implemented: ## Summary I've successfully added an indicator for the currently active session in the session modal. Here's what was implemented: ### Changes Made: 1. **`dialog-session-list.tsx`**: - Added a `currentSessionID` memo that extracts the current session ID from the route context - Passed the current session ID to the `DialogSelect` component via the `current` prop 2. **`dialog-select.tsx`**: - Modified the `Option` component to show a big dot (●) indicator on the left side of the session name when the session is currently active - The dot appears only when the session is current but not selected (to avoid visual clutter) - The dot uses the theme's primary color for consistency ### How it works: - When the session list modal opens, it checks the current route to see if there's an active session - The `DialogSelect` component receives the current session ID and compares it with each option - For the matching session, a big dot (●) is displayed on the left side of the session name - The dot is colored with the theme's primary color and only shows when the session is not actively selected ### Visual result: The indicator will look like this in the session list: ``` ● My Current Session 2:30 PM Other Session 1:15 PM Another Session Yesterday ``` This matches the requested behavior from the issue - a big dot on the left side of the session name when the session list modal is open, indicating which session is currently active. The implementation follows the existing code patterns in the codebase and uses the established theme system for consistent styling. Closes #3977 <a href="https://opencode.ai/s/3ttMaCyj"><img width="200" alt="New%20session%20-%202025-11-06T06%3A51%3A05.947Z" src="https://social-cards.sst.dev/opencode-share/TmV3IHNlc3Npb24gLSAyMDI1LTExLTA2VDA2OjUxOjA1Ljk0N1o=.png?model=opencode/glm-4.6&version=1.0.35&id=3ttMaCyj" /></a> [opencode session](https://opencode.ai/s/3ttMaCyj)&nbsp;&nbsp;|&nbsp;&nbsp;[github run](/sst/opencode/actions/runs/19127339517)
yindo added the pull-request label 2026-02-16 18:15:34 -05:00
yindo closed this issue 2026-02-16 18:15:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10829