Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7280bf4
update rules
sawka Feb 19, 2026
4c6fd13
first cut at new block-tab based badge system
sawka Feb 20, 2026
51489eb
Merge remote-tracking branch 'origin/main' into sawka/block-indicators
sawka Mar 2, 2026
a75253f
run go generate, fix baseds import
sawka Mar 2, 2026
f7fda6a
Merge remote-tracking branch 'origin/main' into sawka/block-indicators
sawka Mar 5, 2026
f3d27e5
move indicators to their own file (badge.ts)
sawka Mar 5, 2026
95ec727
move tabindicatormap too
sawka Mar 5, 2026
ac7f295
move subscription to badge.ts, clean up some warnings
sawka Mar 5, 2026
e3aa0b8
clean up some warnings
sawka Mar 5, 2026
30788d0
setup FE badge store
sawka Mar 5, 2026
a7acdb9
working on badge integration
sawka Mar 5, 2026
f980494
add clearall for badge event
sawka Mar 5, 2026
260c767
add clearbyid
sawka Mar 5, 2026
c448ee7
add badgewatchpid
sawka Mar 5, 2026
f30f394
working on `wsh badge`
sawka Mar 5, 2026
a88c3bf
hook up pid watching to wsh badge command
sawka Mar 5, 2026
8d6f2ad
checkpoint on moving from tabiindicators to badges
sawka Mar 5, 2026
339cd6c
clear transient tab badges with focus as well
sawka Mar 5, 2026
ccf64e6
more badge migration
sawka Mar 5, 2026
498e0d9
remove tabindicators (backend+frontend), more badges
sawka Mar 6, 2026
09fed4e
getting the badges to show... up to 3 on a tab...
sawka Mar 6, 2026
2fb15c4
add flag color
sawka Mar 6, 2026
1806574
add context menu to flag tab...
sawka Mar 6, 2026
144db86
remove badge persistence
sawka Mar 6, 2026
820f535
focus should not clear pidlinked badges
sawka Mar 6, 2026
897f2d4
update tab bar, change flag to be a flag, resort badges
sawka Mar 6, 2026
c737c6e
Merge remote-tracking branch 'origin/main' into sawka/block-indicators
sawka Mar 6, 2026
e50de18
clean up some scss
sawka Mar 6, 2026
ddc9cff
remove ::after psudo element, just render the dividers in react
sawka Mar 6, 2026
9d1007d
dont use ctx in long running poller
sawka Mar 9, 2026
2518d31
fix nits
sawka Mar 9, 2026
dc2315d
fix nit
sawka Mar 9, 2026
64f6d4f
merge main
sawka Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove ::after psudo element, just render the dividers in react
  • Loading branch information
sawka committed Mar 6, 2026
commit ddc9cff5910f82568274f0fd50eca233da75248a
28 changes: 12 additions & 16 deletions frontend/app/tab/tab.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024, Command Line Inc.
// Copyright 2026, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

.tab {
Expand All @@ -14,13 +14,12 @@
align-items: center;
justify-content: center;

&::after {
content: "";
.tab-divider {
position: absolute;
left: 0;
width: 1px;
height: 14px;
border-right: 1px solid rgb(from var(--main-text-color) r g b / 0.2);
background: rgb(from var(--main-text-color) r g b / 0.2);
}

.tab-inner {
Expand Down Expand Up @@ -48,15 +47,6 @@
color: rgba(255, 255, 255, 1);
font-weight: 600;
}

& + .tab::after,
&::after {
content: none;
}
}

&:first-child::after {
content: none;
}

.name {
Expand Down Expand Up @@ -104,11 +94,17 @@
}

// Only apply hover effects when not in nohover mode. This prevents the previously-hovered tab from remaining hovered while a tab view is not mounted.
body:not(.nohover) .tab:hover + .tab,
body:not(.nohover) .tab.dragging + .tab {
.tab-divider {
display: none;
}
}

body:not(.nohover) .tab:hover,
body:not(.nohover) .tab.dragging {
& + .tab::after,
&::after {
content: none;
.tab-divider {
display: none;
}

.tab-inner {
Expand Down
13 changes: 6 additions & 7 deletions frontend/app/tab/tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface TabVProps {
tabId: string;
tabName: string;
active: boolean;
isBeforeActive: boolean;
showDivider: boolean;
isDragging: boolean;
tabWidth: number;
isNew: boolean;
Expand Down Expand Up @@ -82,7 +82,7 @@ const TabV = forwardRef<HTMLDivElement, TabVProps>((props, ref) => {
tabId,
tabName,
active,
isBeforeActive,
showDivider,
isDragging,
tabWidth,
isNew,
Expand Down Expand Up @@ -204,14 +204,14 @@ const TabV = forwardRef<HTMLDivElement, TabVProps>((props, ref) => {
className={clsx("tab", {
active,
dragging: isDragging,
"before-active": isBeforeActive,
"new-tab": isNew,
})}
onMouseDown={onDragStart}
onClick={onClick}
onContextMenu={onContextMenu}
data-tab-id={tabId}
>
{showDivider && <div className="tab-divider" />}
<div className="tab-inner">
<div
ref={editableRef}
Expand Down Expand Up @@ -318,8 +318,7 @@ function buildTabContextMenu(
interface TabProps {
id: string;
active: boolean;
isFirst: boolean;
isBeforeActive: boolean;
showDivider: boolean;
isDragging: boolean;
tabWidth: number;
isNew: boolean;
Expand All @@ -330,7 +329,7 @@ interface TabProps {
}

const TabInner = forwardRef<HTMLDivElement, TabProps>((props, ref) => {
const { id, active, isBeforeActive, isDragging, tabWidth, isNew, onLoaded, onSelect, onClose, onDragStart } = props;
const { id, active, showDivider, isDragging, tabWidth, isNew, onLoaded, onSelect, onClose, onDragStart } = props;
const [tabData, _] = useWaveObjectValue<Tab>(makeORef("tab", id));
const badges = useAtomValue(getTabBadgeAtom(id));

Expand Down Expand Up @@ -382,7 +381,7 @@ const TabInner = forwardRef<HTMLDivElement, TabProps>((props, ref) => {
tabId={id}
tabName={tabData?.name ?? ""}
active={active}
isBeforeActive={isBeforeActive}
showDivider={showDivider}
isDragging={isDragging}
tabWidth={tabWidth}
isNew={isNew}
Expand Down
11 changes: 5 additions & 6 deletions frontend/app/tab/tabbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,7 @@ const TabBar = memo(({ workspace }: TabBarProps) => {
});
}, []);

const isBeforeActive = (tabId: string) => {
return tabIds.indexOf(tabId) === tabIds.indexOf(activeTabId) - 1;
};
const activeTabIndex = tabIds.indexOf(activeTabId);

function onEllipsisClick() {
getApi().showWorkspaceAppMenu(workspace.oid);
Expand Down Expand Up @@ -689,18 +687,19 @@ const TabBar = memo(({ workspace }: TabBarProps) => {
<div className="tab-bar" ref={tabBarRef} data-overlayscrollbars-initialize>
<div className="tabs-wrapper" ref={tabsWrapperRef} style={{ width: `${tabsWrapperWidth}px` }}>
{tabIds.map((tabId, index) => {
const isActive = activeTabId === tabId;
const showDivider = index !== 0 && !isActive && index !== activeTabIndex + 1;
return (
<Tab
key={tabId}
ref={tabRefs.current[index]}
id={tabId}
isFirst={index === 0}
showDivider={showDivider}
onSelect={() => handleSelectTab(tabId)}
active={activeTabId === tabId}
active={isActive}
onDragStart={(event) => handleDragStart(event, tabId, tabRefs.current[index])}
onClose={(event) => handleCloseTab(event, tabId)}
onLoaded={() => handleTabLoaded(tabId)}
isBeforeActive={isBeforeActive(tabId)}
isDragging={draggingTab === tabId}
tabWidth={tabWidthRef.current}
isNew={tabId === newTabId}
Expand Down
13 changes: 4 additions & 9 deletions frontend/preview/previews/tab.preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ interface PreviewTabEntry {
tabId: string;
tabName: string;
active: boolean;
isBeforeActive: boolean;
badges?: Badge[] | null;
flagColor?: string | null;
}

const tabDefs: PreviewTabEntry[] = [
{ tabId: "preview-tab-1", tabName: "Terminal", active: false, isBeforeActive: true },
{ tabId: "preview-tab-1", tabName: "Terminal", active: false },
{
tabId: "preview-tab-2",
tabName: "My Tab",
active: true,
isBeforeActive: false,
badges: [
{ badgeid: "b2", icon: "circle-check", color: "#4ade80", priority: 3 },
{ badgeid: "b1", icon: "circle-small", color: "#fbbf24", priority: 1 },
Expand All @@ -33,26 +31,23 @@ const tabDefs: PreviewTabEntry[] = [
tabId: "preview-tab-2b",
tabName: "My Tab 2",
active: false,
isBeforeActive: false,
badges: [
{ badgeid: "b2", icon: "bell", color: "#4ade80", priority: 3 },
{ badgeid: "b1", icon: "circle-small", color: "red", priority: 1 },
],
},
{ tabId: "preview-tab-3", tabName: "T3", active: false, isBeforeActive: false, flagColor: "#4ade80" },
{ tabId: "preview-tab-3", tabName: "T3", active: false, flagColor: "#4ade80" },
{
tabId: "preview-tab-4",
tabName: "1 Badge",
active: false,
isBeforeActive: false,
badges: [{ badgeid: "b1", icon: "circle-small", color: "#fbbf24", priority: 1 }],
flagColor: "#fbbf24",
},
{
tabId: "preview-tab-5",
tabName: "3 Badges",
active: false,
isBeforeActive: false,
badges: [
{ badgeid: "b1", icon: "circle-small", color: "#fbbf24", priority: 1 },
{ badgeid: "b2", icon: "circle-check", color: "#4ade80", priority: 3 },
Expand Down Expand Up @@ -86,7 +81,7 @@ export function TabPreview() {
{tabDefs.map((tab, index) => {
const activeIndex = tabDefs.findIndex((t) => t.tabId === activeTabId);
const isActive = tab.tabId === activeTabId;
const isBeforeActive = index === activeIndex - 1;
const showDivider = index !== 0 && !isActive && index !== activeIndex + 1;
return (
<TabV
key={tab.tabId}
Expand All @@ -96,7 +91,7 @@ export function TabPreview() {
tabId={tab.tabId}
tabName={tabNames[tab.tabId]}
active={isActive}
isBeforeActive={isBeforeActive}
showDivider={showDivider}
isDragging={false}
tabWidth={TAB_WIDTH}
isNew={false}
Expand Down
10 changes: 9 additions & 1 deletion frontend/tailwindsetup.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* Copyright 2025, Command Line Inc.
/* Copyright 2026, Command Line Inc.
SPDX-License-Identifier: Apache-2.0 */

@import "tailwindcss";

@source "../node_modules/streamdown/dist/index.js";

@theme {
Expand Down Expand Up @@ -75,6 +76,13 @@
--z-window-drag: 100;
}

/* Applied when body.nohover is set — used to suppress hover effects during tab remount to prevent ghost-hover flicker */
@custom-variant nohover {
body.nohover & {
@slot;
}
}

:root {
--zoomfactor: 1;
--zoomfactor-inv: 1;
Expand Down