Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3a15a6d
feat(shared): add spent-today usage helper with trailing pace
SaahiilM Nov 4, 2026
50ef239
feat(web): add sidebar quick-usage popover
SaahiilM Nov 4, 2026
b30ff83
feat(web): wire Usage icon to quick popover
SaahiilM Nov 4, 2026
1e5122e
fix(web): refine quick usage popover
SaahiilM Nov 4, 2026
112589b
fix(web): align and configure usage shortcut
SaahiilM Nov 4, 2026
35faa4a
fix(web): close usage popover before navigation
SaahiilM Nov 4, 2026
1ebe52a
fix(web): theme quick usage colors
SaahiilM Nov 4, 2026
cba9f8d
feat(web): use segmented provider picker
SaahiilM Nov 4, 2026
c4aa734
fix(web): keep Usage page as sidebar default
SaahiilM Nov 5, 2026
ec19bda
Merge remote-tracking branch 'upstream/main' into feat/quick-usage-po…
SaahiilM Nov 5, 2026
aeb4fe5
fix(web): preserve Quick Usage empty-state access
SaahiilM Nov 5, 2026
a87b2ea
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 5, 2026
42490e2
fix(web): refresh quick usage state on open
SaahiilM Nov 5, 2026
3160769
fix(web): report failed Quick Usage refreshes
SaahiilM Nov 5, 2026
75f03a2
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 5, 2026
ab5b606
fix(web): handle Quick Usage refresh failures
SaahiilM Nov 5, 2026
e14564a
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 5, 2026
00006c6
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 5, 2026
e3bf34c
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 5, 2026
16d9b3e
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 5, 2026
913f1d0
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 6, 2026
24a437c
fix(web): show Quick Usage query errors
SaahiilM Nov 6, 2026
4e3cc22
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 9, 2026
46ef5fc
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 9, 2026
4a9f08a
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 10, 2026
686d1da
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 10, 2026
b16a325
fix(web): clarify Quick Usage limit errors
SaahiilM Nov 10, 2026
4362e2c
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 12, 2026
8cc8923
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 13, 2026
338ccd2
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 16, 2026
b9eadff
Merge remote-tracking branch 'origin/main' into feat/quick-usage-popover
SaahiilM Nov 17, 2026
53465ba
Merge remote-tracking branch 'origin/main' into feat/quick-usage-popover
SaahiilM Nov 17, 2026
d20c1c4
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 17, 2026
fc1bc30
Merge remote-tracking branch 'upstream/main' into feat/quick-usage-po…
SaahiilM Nov 18, 2026
66f6485
fix(web): regenerate Quick Usage translation catalogs
SaahiilM Nov 18, 2026
84c09a1
fix(web): keep Quick Usage current and translated
SaahiilM Nov 18, 2026
35fd1d6
fix(web): clarify Quick Usage caps and spending pace
SaahiilM Nov 18, 2026
49e8b3b
fix(web): reuse the translated partial usage notice
SaahiilM Nov 18, 2026
101675f
Merge branch 'main' into feat/quick-usage-popover
SaahiilM Nov 20, 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
50 changes: 50 additions & 0 deletions apps/web/src/components/settings/AppearanceSettingsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
type ChatWidth,
type EffortDisplay,
type EnvironmentIdentificationMode,
type UsageIconClickBehavior,
MAX_APPEARANCE_CONTRAST,
MAX_GLASS_OPACITY,
MAX_PANEL_ANIMATION_DURATION_MS,
Expand Down Expand Up @@ -85,6 +86,11 @@ const EFFORT_DISPLAY_LABELS: Record<EffortDisplay, string> = {
bars: msg("Bars", { $context: "show effort as bars" }),
};

const USAGE_ICON_CLICK_BEHAVIOR_LABELS: Record<UsageIconClickBehavior, string> = {
"quick-view": msg("Quick view"),
"usage-page": msg("Usage page"),
};

export function AppearanceSettingsPanel() {
const searchableSetting = useSearchableSetting();
const {
Expand Down Expand Up @@ -294,6 +300,50 @@ export function AppearanceSettingsPanel() {
</div>
}
/>
<SettingsRow
{...searchableSetting("usage-icon-click-behavior")}
description={gt(
"Choose whether the Usage icon below the thread list opens the full Usage page or the optional quick view.",
)}
resetAction={
settings.usageIconClickBehavior !== DEFAULT_UNIFIED_SETTINGS.usageIconClickBehavior ? (
<SettingResetButton
ariaLabel={gt("Reset usage icon action to default")}
onClick={() =>
updateSettings({
usageIconClickBehavior: DEFAULT_UNIFIED_SETTINGS.usageIconClickBehavior,
})
}
/>
) : null
}
control={
<div className="w-full sm:w-40">
<Select
value={settings.usageIconClickBehavior}
onValueChange={(value) => {
if (value === "quick-view" || value === "usage-page") {
updateSettings({ usageIconClickBehavior: value });
}
}}
>
<SelectTrigger
size="sm"
className="w-full min-w-0"
aria-label={gt("Usage icon action")}
>
<SelectValue>
{m(USAGE_ICON_CLICK_BEHAVIOR_LABELS[settings.usageIconClickBehavior])}
</SelectValue>
</SelectTrigger>
<SelectPopup align="end" alignItemWithTrigger={false}>
<SelectItem value="usage-page">{gt("Usage page (default)")}</SelectItem>
<SelectItem value="quick-view">{gt("Quick view")}</SelectItem>
</SelectPopup>
</Select>
</div>
}
/>
<ThreadDetailsItemsRow />
<SettingsRow
{...searchableSetting("effort-display")}
Expand Down
6 changes: 6 additions & 0 deletions apps/web/src/components/settings/settingsSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,12 @@ export const SETTINGS_SEARCH_ITEMS = [
to: "/settings/appearance",
searchTerms: [msg("wide full width column layout messages composer monitor")],
},
{
id: "usage-icon-click-behavior",
title: msg("Usage icon action"),
to: "/settings/appearance",
searchTerms: [msg("sidebar quick view popover usage page limits icon click")],
},
{
id: "thread-details-items",
title: msg("Thread details"),
Expand Down
29 changes: 19 additions & 10 deletions apps/web/src/components/sidebar/SidebarChrome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { memo } from "react";
import { Link, useLocation, useNavigate } from "@tanstack/react-router";

import { useAtomValue } from "@effect/atom-react";
import { useEnvironmentIdentificationMode } from "../../hooks/useSettings";
import { useEnvironmentIdentificationMode, usePrimarySettings } from "../../hooks/useSettings";
import { shortcutLabelForCommand } from "../../keybindings";
import {
navigateHistory,
Expand Down Expand Up @@ -40,6 +40,7 @@ import { isSidebarUtilityPage, useNavigateToMainApp } from "./mainAppLocation";
import { SidebarThreadUndoNotice } from "./SidebarThreadUndoNotice";
import { SidebarProviderUpdatePill } from "./SidebarProviderUpdatePill";
import { SidebarUpdateArchitectureWarning, SidebarUpdatePill } from "./SidebarUpdatePill";
import { QuickUsagePopover } from "../usage/QuickUsagePopover";
import { PullRequestGlyph } from "~/components/pullRequest/pullRequestIcons";
import { observeResize } from "~/lib/observeResize";

Expand Down Expand Up @@ -233,6 +234,7 @@ const SidebarUtilityMenu = memo(function SidebarUtilityMenu() {
const isOnUtilityPage = useLocation({
select: (location) => isSidebarUtilityPage(location.pathname),
});
const usageIconClickBehavior = usePrimarySettings((settings) => settings.usageIconClickBehavior);
const pullRequestsSupported = usePullRequestsSupported();
const issuesSupported = useIssuesSupported();
const closeMobileSidebar = () => {
Expand All @@ -256,10 +258,8 @@ const SidebarUtilityMenu = memo(function SidebarUtilityMenu() {
void navigate({ to: "/settings" });
};

const handleUsageClick = () => {
if (isMobile) {
setOpenMobile(false);
}
const handleUsageOpenFull = () => {
closeMobileSidebar();
void navigate({ to: "/usage" });
};

Expand Down Expand Up @@ -300,11 +300,20 @@ const SidebarUtilityMenu = memo(function SidebarUtilityMenu() {
onClick={handleIssuesClick}
/>
) : null}
<SidebarUtilityItem
icon={<ChartNoAxesColumnIcon />}
label={gt("Usage")}
onClick={handleUsageClick}
/>
{usageIconClickBehavior === "usage-page" ? (
<SidebarUtilityItem
icon={<ChartNoAxesColumnIcon />}
label={gt("Usage")}
onClick={handleUsageOpenFull}
/>
) : (
<SidebarMenuItem className="shrink-0">
<QuickUsagePopover
trigger={<ChartNoAxesColumnIcon />}
onOpenFull={handleUsageOpenFull}
/>
</SidebarMenuItem>
)}
</>
)}
<SidebarThreadUndoNotice />
Expand Down
5 changes: 4 additions & 1 deletion apps/web/src/components/ui/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const popoverPopupWidthClassName = {
sm: "w-64",
md: "w-80",
lg: "w-96",
xl: "w-[26rem]",
} as const;

const popoverViewportPaddingClassName = {
Expand All @@ -40,6 +41,7 @@ function PopoverPopup({
sideOffset = 4,
alignOffset = 0,
collisionAvoidance,
collisionPadding,
tooltipStyle = false,
keepMounted = false,
anchor,
Expand All @@ -53,6 +55,7 @@ function PopoverPopup({
sideOffset?: PopoverPrimitive.Positioner.Props["sideOffset"];
alignOffset?: PopoverPrimitive.Positioner.Props["alignOffset"];
collisionAvoidance?: PopoverPrimitive.Positioner.Props["collisionAvoidance"];
collisionPadding?: PopoverPrimitive.Positioner.Props["collisionPadding"];
tooltipStyle?: boolean;
keepMounted?: PopoverPrimitive.Portal.Props["keepMounted"];
anchor?: PopoverPrimitive.Positioner.Props["anchor"];
Expand All @@ -76,7 +79,7 @@ function PopoverPopup({
alignOffset={alignOffset}
anchor={anchor}
collisionAvoidance={collisionAvoidance}
collisionPadding={variant === "panel" ? 0 : undefined}
collisionPadding={collisionPadding ?? (variant === "panel" ? 0 : undefined)}
className={cn(
"h-(--positioner-height) max-h-(--available-height) w-(--positioner-width) max-w-(--available-width)",
// Kept-mounted positioners first paint at the window origin, so a transform transition slides them in from there.
Expand Down
Loading
Loading