Skip to content

Commit 0aaebe9

Browse files
authored
fix(app): give Feed row titles the whole line on hover, and open the Feed first (#6695)
Feed rows kept their time on the first line while hovered (invisible but still taking space) and put the Cmd+number badge beside both lines, so the hover title scroll had only a sliver of the row and the second line was cut short. The time now leaves the line on hover and the badge sits on the first line, so titles scroll across the same width as in the Workspaces view. Feed is now the first option and the default view, and the add-workspace button stays in the header in both views. Signed-off-by: Jalil <reachjalil@gmail.com>
1 parent 7d9daba commit 0aaebe9

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

‎apps/app/src/react-app/domains/session/sidebar/app-sidebar.tsx‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ export function AppSidebar(props: AppSidebarProps) {
995995
{t("workspace_list.title")}
996996
</span>
997997
)}
998-
{canCreateWorkspaces() && !feedView ? (
998+
{canCreateWorkspaces() ? (
999999
<button
10001000
type="button"
10011001
className="ml-auto flex size-5 items-center justify-center rounded text-muted-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-foreground"
@@ -1084,7 +1084,7 @@ function GlobalPinnedSessions({ entries }: { entries: GlobalPinnedSessionEntry[]
10841084
);
10851085
}
10861086

1087-
const SIDEBAR_VIEWS: SidebarView[] = ["workspaces", "feed"];
1087+
const SIDEBAR_VIEWS: SidebarView[] = ["feed", "workspaces"];
10881088

10891089
/** Replaces the Workspaces label: the tree, or every workspace's sessions in one feed. */
10901090
function SidebarViewSwitch({ view, onChange }: { view: SidebarView; onChange: (view: SidebarView) => void }) {
@@ -2458,19 +2458,21 @@ export function SessionMenuItem({
24582458
<span className="flex min-w-0 flex-1 flex-col">
24592459
<span className="flex min-w-0 items-center gap-2">
24602460
<SessionTitle intent={titleIntent} title={displayTitle} tooltip={itemTitle} />
2461-
{relativeTime ? (
2462-
<span className="shrink-0 text-[11px] tabular-nums text-muted-foreground group-hover/menu-sub-item:invisible group-has-data-popup-open/menu-sub-item:invisible">
2461+
{/* Hidden, not invisible, on hover so the title can scroll across the whole line. */}
2462+
{relativeTime && shortcutDigit === undefined ? (
2463+
<span className="shrink-0 text-[11px] tabular-nums text-muted-foreground group-hover/menu-sub-item:hidden group-has-data-popup-open/menu-sub-item:hidden">
24632464
{isStarting || resolvedActiveWork ? t("workspace_list.feed_now") : relativeTime}
24642465
</span>
24652466
) : null}
2467+
<SessionNumberShortcutSlot digit={shortcutDigit} />
24662468
</span>
24672469
<span className="flex min-w-0 items-center gap-1.5 text-[11px] leading-4 text-muted-foreground" data-session-feed-subtitle>
24682470
<span className="min-w-0 truncate">{subtitle}</span>
24692471
{feedState ? <span className={cn("ms-auto shrink-0", feedState.className)}>{feedState.label}</span> : null}
24702472
</span>
24712473
</span>
24722474
) : <SessionTitle intent={titleIntent} title={displayTitle} tooltip={itemTitle} />}
2473-
<SessionNumberShortcutSlot digit={shortcutDigit} />
2475+
{subtitle ? null : <SessionNumberShortcutSlot digit={shortcutDigit} />}
24742476
</SidebarMenuSubButton>
24752477
{trailing}
24762478
</div>

‎apps/app/src/react-app/domains/session/sidebar/session-management-store.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export const useSessionManagementStore = create<SessionManagementStore>()(
255255
unreadIds: [],
256256
settledById: {},
257257
autoSettleDays: DEFAULT_AUTO_SETTLE_DAYS,
258-
sidebarView: "workspaces",
258+
sidebarView: "feed",
259259
feedFolders: [],
260260
orderByWorkspace: {},
261261
groupsByWorkspace: {},
@@ -328,7 +328,7 @@ export const useSessionManagementStore = create<SessionManagementStore>()(
328328
};
329329
}),
330330

331-
setSidebarView: (view) => set({ sidebarView: view === "feed" ? "feed" : "workspaces" }),
331+
setSidebarView: (view) => set({ sidebarView: view === "workspaces" ? "workspaces" : "feed" }),
332332

333333
setAutoSettleDays: (days) =>
334334
set({ autoSettleDays: AUTO_SETTLE_DAY_OPTIONS.some((option) => option === days) ? days : DEFAULT_AUTO_SETTLE_DAYS }),

0 commit comments

Comments
 (0)