mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-31 05:32:58 +00:00
Streamline sidebar usage and stacked sheet interactions (#5805)
* feat(app): streamline sidebar usage and stacked sheets * fix(app): restore compact sidebar navigation clicks The close button container emitted box-none through Unistyles as invalid CSS and intercepted New workspace clicks. Let React Native apply click-through behavior at the view boundary. Keep the import journey on its existing New workspace screen and assert only the visible transcript. * fix(app): cap menu sheets at eighty percent height Keep long sidebar usage reports recognizably sheet-sized while allowing the content to scroll. Short menu sheets retain dynamic sizing.
This commit is contained in:
@@ -307,6 +307,38 @@ describe("Claude usage source scoped weekly limits", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("summarizes the session and weekly windows by default, not scoped ones", async () => {
|
||||
const { provider } = claudeProvider({
|
||||
five_hour: { utilization: 6, resets_at: "2026-06-01T21:00:00Z" },
|
||||
seven_day: { utilization: 23, resets_at: "2026-06-04T00:00:00Z" },
|
||||
limits: [fableLimit()],
|
||||
});
|
||||
|
||||
const usage = await provider.fetchUsage();
|
||||
|
||||
expect(usage.windows.map((window) => [window.id, window.summary ?? false])).toEqual([
|
||||
["five_hour", true],
|
||||
["weekly", true],
|
||||
["weekly_model_fable", false],
|
||||
]);
|
||||
});
|
||||
|
||||
it("gives every window a short label for tight spaces", async () => {
|
||||
const { provider } = claudeProvider({
|
||||
five_hour: { utilization: 6, resets_at: "2026-06-01T21:00:00Z" },
|
||||
seven_day: { utilization: 23, resets_at: "2026-06-04T00:00:00Z" },
|
||||
limits: [fableLimit()],
|
||||
});
|
||||
|
||||
const usage = await provider.fetchUsage();
|
||||
|
||||
expect(usage.windows.map((window) => [window.id, window.shortLabel])).toEqual([
|
||||
["five_hour", "5h"],
|
||||
["weekly", "wk"],
|
||||
["weekly_model_fable", "wk Fable"],
|
||||
]);
|
||||
});
|
||||
|
||||
it("renders a scoped window that is at zero and inactive", async () => {
|
||||
const { provider } = claudeProvider({
|
||||
seven_day: { utilization: 23, resets_at: "2026-06-04T00:00:00Z" },
|
||||
|
||||
@@ -112,9 +112,11 @@ const UNSCOPED_WINDOWS: ReadonlyArray<{
|
||||
field: "five_hour" | "seven_day";
|
||||
id: string;
|
||||
label: string;
|
||||
shortLabel: string;
|
||||
summary: boolean;
|
||||
}> = [
|
||||
{ field: "five_hour", id: "five_hour", label: "Session" },
|
||||
{ field: "seven_day", id: "weekly", label: "Weekly" },
|
||||
{ field: "five_hour", id: "five_hour", label: "Session", shortLabel: "5h", summary: true },
|
||||
{ field: "seven_day", id: "weekly", label: "Weekly", shortLabel: "wk", summary: true },
|
||||
];
|
||||
|
||||
// Scoped windows from before `limits[]` existed. Declaring the dimension here is what
|
||||
@@ -253,6 +255,8 @@ function unscopedWindows(resp: ClaudeUsageResponse): UsageWindow[] {
|
||||
windowFromUsedPct({
|
||||
id: spec.id,
|
||||
label: spec.label,
|
||||
shortLabel: spec.shortLabel,
|
||||
summary: spec.summary,
|
||||
utilizationPct: window.utilization,
|
||||
resetsAt: window.resets_at ?? null,
|
||||
tone: toneFromUsedPct(window.utilization),
|
||||
@@ -272,6 +276,7 @@ function scopedWindows(limits: ScopedLimit[]): UsageWindow[] {
|
||||
return windowFromUsedPct({
|
||||
id,
|
||||
label: `Weekly \u00b7 ${limit.name}`,
|
||||
shortLabel: `wk ${limit.name}`,
|
||||
utilizationPct: limit.usedPct,
|
||||
resetsAt: limit.resetsAt,
|
||||
tone: toneFromUsedPct(limit.usedPct),
|
||||
|
||||
Reference in New Issue
Block a user