Skip to content

Commit e0800f1

Browse files
committed
fix more lints
1 parent d5022d8 commit e0800f1

132 files changed

Lines changed: 25 additions & 2750 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/webapp/app/components/BlankStatePanels.tsx

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ import {
33
BellAlertIcon,
44
BookOpenIcon,
55
ChatBubbleLeftRightIcon,
6-
ClockIcon,
76
PlusIcon,
87
QuestionMarkCircleIcon,
9-
RectangleGroupIcon,
108
SparklesIcon,
119
Squares2X2Icon,
1210
} from "@heroicons/react/20/solid";
13-
import { useLocation } from "react-use";
1411
import { AIChatIcon } from "~/assets/icons/AIChatIcon";
1512
import { AIPenIcon } from "~/assets/icons/AIPenIcon";
1613
import { BranchEnvironmentIconSmall } from "~/assets/icons/EnvironmentIcons";
@@ -32,7 +29,6 @@ import {
3229
v3CreateBulkActionPath,
3330
v3EnvironmentPath,
3431
v3NewProjectAlertPath,
35-
v3NewSchedulePath,
3632
} from "~/utils/pathBuilder";
3733
import { AskAgentButton } from "./dashboard-agent/AskAgentButton";
3834
import { CodeBlock } from "./code/CodeBlock";
@@ -212,71 +208,6 @@ export function HasNoTasksDeployed({ environment }: { environment: MinimumEnviro
212208
return <DeploymentOnboardingSteps />;
213209
}
214210

215-
function SchedulesNoPossibleTaskPanel() {
216-
return (
217-
<InfoPanel
218-
title="Create your first scheduled task"
219-
icon={ClockIcon}
220-
iconClassName="text-schedules"
221-
panelClassName="max-w-full"
222-
accessory={
223-
<LinkButton
224-
to={docsPath("v3/tasks-scheduled")}
225-
variant="docs/small"
226-
LeadingIcon={BookOpenIcon}
227-
>
228-
How to schedule tasks
229-
</LinkButton>
230-
}
231-
>
232-
<Paragraph spacing variant="small">
233-
You have no scheduled tasks in your project. Before you can schedule a task you need to
234-
create a <InlineCode>schedules.task</InlineCode>.
235-
</Paragraph>
236-
</InfoPanel>
237-
);
238-
}
239-
240-
function SchedulesNoneAttached() {
241-
const organization = useOrganization();
242-
const project = useProject();
243-
const environment = useEnvironment();
244-
const location = useLocation();
245-
246-
return (
247-
<InfoPanel
248-
title="Attach your first schedule"
249-
icon={ClockIcon}
250-
iconClassName="text-schedules"
251-
panelClassName="max-w-full"
252-
>
253-
<Paragraph spacing variant="small">
254-
Scheduled tasks will only run automatically if you connect a schedule to them, you can do
255-
this in the dashboard or using the SDK.
256-
</Paragraph>
257-
<div className="flex gap-2">
258-
<LinkButton
259-
to={`${v3NewSchedulePath(organization, project, environment)}${location.search}`}
260-
variant="secondary/medium"
261-
LeadingIcon={RectangleGroupIcon}
262-
className="inline-flex"
263-
leadingIconClassName="text-blue-500"
264-
>
265-
Use the dashboard
266-
</LinkButton>
267-
<LinkButton
268-
to={docsPath("v3/tasks-scheduled")}
269-
variant="docs/medium"
270-
LeadingIcon={BookOpenIcon}
271-
className="inline-flex"
272-
>
273-
Use the SDK
274-
</LinkButton>
275-
</div>
276-
</InfoPanel>
277-
);
278-
}
279-
280211
export function BatchesNone() {
281212
return (
282213
<InfoPanel

apps/webapp/app/components/FeatureBadges.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ export function AlphaBadge({
2929
);
3030
}
3131

32-
function AlphaTitle({ children }: { children: React.ReactNode }) {
33-
return (
34-
<>
35-
<span>{children}</span>
36-
<AlphaBadge />
37-
</>
38-
);
39-
}
40-
4132
export function BetaBadge({ inline = false, className }: { inline?: boolean; className?: string }) {
4233
return (
4334
<SimpleTooltip
@@ -59,15 +50,6 @@ export function BetaBadge({ inline = false, className }: { inline?: boolean; cla
5950
);
6051
}
6152

62-
function BetaTitle({ children }: { children: React.ReactNode }) {
63-
return (
64-
<>
65-
<span>{children}</span>
66-
<BetaBadge />
67-
</>
68-
);
69-
}
70-
7153
export function NewBadge({ inline = false, className }: { inline?: boolean; className?: string }) {
7254
return (
7355
<Badge

apps/webapp/app/components/GitHubLoginButton.tsx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
import { cn } from "~/utils/cn";
2-
3-
type GitHubLoginButtonProps = {
4-
label?: string;
5-
className?: string;
6-
onClick?: () => void;
7-
};
8-
9-
function GitHubLoginButton({
10-
label = "Continue with GitHub",
11-
className,
12-
onClick,
13-
}: GitHubLoginButtonProps) {
14-
return (
15-
<button
16-
className={cn(
17-
"flex items-center justify-center gap-2 rounded-md bg-indigo-800 py-3 pl-5 pr-6 text-lg font-medium text-white transition hover:bg-indigo-700",
18-
className
19-
)}
20-
onClick={onClick}
21-
>
22-
<OctoKitty className="h-5 w-5" />
23-
{label}
24-
</button>
25-
);
26-
}
27-
281
export function OctoKitty({ className }: { className?: string }) {
292
return (
303
<svg

apps/webapp/app/components/SetupCommands.tsx

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -243,52 +243,6 @@ export function TriggerDevStepV3({ title }: TabsProps) {
243243
);
244244
}
245245

246-
function TriggerLoginStepV3({ title }: TabsProps) {
247-
const triggerCliTag = useTriggerCliTag();
248-
const { activePackageManager, setActivePackageManager } = usePackageManager();
249-
250-
return (
251-
<ClientTabs
252-
defaultValue="npm"
253-
value={activePackageManager}
254-
onValueChange={setActivePackageManager}
255-
>
256-
<div className="flex items-center gap-4">
257-
{title && <span>{title}</span>}
258-
<ClientTabsList className={title ? "ml-auto" : ""}>
259-
<ClientTabsTrigger value={"npm"}>npm</ClientTabsTrigger>
260-
<ClientTabsTrigger value={"pnpm"}>pnpm</ClientTabsTrigger>
261-
<ClientTabsTrigger value={"yarn"}>yarn</ClientTabsTrigger>
262-
</ClientTabsList>
263-
</div>
264-
<ClientTabsContent value={"npm"}>
265-
<ClipboardField
266-
variant="secondary/medium"
267-
iconButton
268-
className="mb-4"
269-
value={`npx trigger.dev@${triggerCliTag} login`}
270-
/>
271-
</ClientTabsContent>
272-
<ClientTabsContent value={"pnpm"}>
273-
<ClipboardField
274-
variant="secondary/medium"
275-
iconButton
276-
className="mb-4"
277-
value={`pnpm dlx trigger.dev@${triggerCliTag} login`}
278-
/>
279-
</ClientTabsContent>
280-
<ClientTabsContent value={"yarn"}>
281-
<ClipboardField
282-
variant="secondary/medium"
283-
iconButton
284-
className="mb-4"
285-
value={`yarn dlx trigger.dev@${triggerCliTag} login`}
286-
/>
287-
</ClientTabsContent>
288-
</ClientTabs>
289-
);
290-
}
291-
292246
export function TriggerDeployStep({
293247
title,
294248
environment,

apps/webapp/app/components/billing/billingAlertsFormat.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,6 @@ export function shouldResetAlertsOnLimitChange(
4646
return isPercentageAlertMode(previousMode) !== isPercentageAlertMode(nextMode);
4747
}
4848

49-
/** Configured billing limit mode before a save; null when billing limit was never configured. */
50-
function getPreviousBillingLimitModeForAlertSync(
51-
billingLimit: BillingLimitResult
52-
): BillingLimitMode | null {
53-
if (!billingLimit.isConfigured) {
54-
return null;
55-
}
56-
57-
return billingLimit.mode;
58-
}
59-
6049
export function hasConfiguredAlerts(
6150
alerts: BillingAlertsFormData,
6251
billingLimit: BillingLimitResult,
@@ -67,10 +56,6 @@ export function hasConfiguredAlerts(
6756
return storedAlertsToThresholds(alerts, mode, effectiveLimitCents, planLimitCents).length > 0;
6857
}
6958

70-
function hasSavedAlertThresholds(alerts: BillingAlertsFormData): boolean {
71-
return alerts.alertLevels.length > 0;
72-
}
73-
7459
/** Saved thresholds that would be cleared when the billing limit alert format changes. */
7560
export function hadSavedAlertsToClearOnLimitChange(
7661
alerts: BillingAlertsFormData,
@@ -235,33 +220,6 @@ export function isLegacyDollarAmountField(
235220

236221
return rawAmount === planDollars || rawAmount === effectiveDollars;
237222
}
238-
function isAbsoluteSavedAlerts(alerts: BillingAlertsFormData): boolean {
239-
return getSavedAlertAmountCents(alerts) === ABSOLUTE_ALERT_BASE_CENTS;
240-
}
241-
242-
/** Build a cleaned alerts payload when saving billing limits in the same alert format. */
243-
function buildCleanedAlertsPayloadForLimitSave(
244-
alerts: BillingAlertsFormData,
245-
nextMode: BillingLimitMode,
246-
effectiveLimitCents: number,
247-
planLimitCents: number
248-
): { amount: number; alertLevels: number[]; emails: string[] } | null {
249-
if (alerts.alertLevels.length === 0) {
250-
return null;
251-
}
252-
253-
const thresholds = storedAlertsToThresholds(
254-
alerts,
255-
nextMode,
256-
effectiveLimitCents,
257-
planLimitCents
258-
);
259-
260-
return {
261-
emails: alerts.emails,
262-
...thresholdsToAlertPayload(thresholds, nextMode, effectiveLimitCents),
263-
};
264-
}
265223

266224
/** Convert stored percentage alert levels to UI percent values (10, 50, 80). */
267225
export function percentageAlertLevelsToUiThresholds(levels: number[]): number[] {
@@ -386,10 +344,6 @@ export function thresholdsToAlertPayload(
386344
};
387345
}
388346

389-
function isEmptyThreshold(value: number): boolean {
390-
return !Number.isFinite(value) || value <= 0;
391-
}
392-
393347
export function previewDollarAmountForPercent(
394348
percent: number,
395349
effectiveLimitCents: number

apps/webapp/app/components/dashboard-agent/chat-layout.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -116,24 +116,6 @@ export function ChatProgress({ children }: { children: React.ReactNode }) {
116116
);
117117
}
118118

119-
function ChatToolRow({ children }: { children: React.ReactNode }) {
120-
return <div className={cn("min-w-0", TURN_BODY_GAP)}>{children}</div>;
121-
}
122-
123-
function ChatNote({ children }: { children: React.ReactNode }) {
124-
const insetClass = useInsetClass();
125-
return (
126-
<div
127-
className={cn(
128-
insetClass,
129-
"rounded-md border border-dashed border-border-bright bg-background-bright/40 px-3 py-2"
130-
)}
131-
>
132-
<span className="text-xs text-text-dimmed">{children}</span>
133-
</div>
134-
);
135-
}
136-
137119
export function ChatStatusLine({
138120
icon,
139121
children,

apps/webapp/app/components/dashboard-agent/demo/fixtures/page-context.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,5 +247,3 @@ export const demoResolvedDismissedPromptIds: string[] = ["sp:fresh-failure"];
247247
export const demoPromptsAfterDismissal: SuggestedPrompt[] = demoPromptSets.failedRun
248248
.filter((p) => !demoDismissedPromptIds.includes(p.id))
249249
.slice(0, SUGGESTED_PROMPT_CAP);
250-
251-

apps/webapp/app/components/dashboard-agent/demo/ids.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ export function demoSourceUri(sha: string, path: string, line?: number): Trigger
5353
});
5454
}
5555

56-
function demoInvestigationUri(investigationId: string): TriggerUri {
57-
return formatTriggerUri({ kind: "investigation", ...scope, investigationId });
58-
}
59-
6056
export const DEMO_WORLD = {
6157
failedRunId: "run_demo0f2c91",
6258
failedSpanId: "span_demoa41b",

apps/webapp/app/components/dashboard-agent/report-sparkline.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ export function ReportNoteBlock({ label, children }: { label: string; children:
318318
*/
319319
export const FOOTER_WATCH_CODE = "watch_recovery";
320320

321-
322321
/** A dimmed line that accompanies a row entry. */
323322
const FOOTER_NOTE_LINES: Record<string, string> = {
324323
check_control_plane: "There's nothing to fix on your side.",
@@ -588,21 +587,6 @@ const LABEL_CLASS = "text-xs uppercase leading-tight tracking-wide text-text-dim
588587
/** A metric's movement against its baseline. Direction is always an arrow. */
589588
export type ReportDelta = { text: string; dir: "up" | "down" | "flat" };
590589

591-
/**
592-
* A view model `Delta` as the row's arrow. A multiplier only reads as movement
593-
* once it rounds past 1×; below that a metric with a baseline is flat, and one
594-
* without a baseline has nothing to compare against.
595-
*/
596-
function reportDelta(
597-
delta: { dir: "up" | "down" | "flat"; mult?: number } | undefined,
598-
hasBaseline: boolean
599-
): ReportDelta | undefined {
600-
if (delta && delta.mult !== undefined && delta.mult > 1 && delta.dir !== "flat") {
601-
return { text: `${delta.dir === "up" ? "↑" : "↓"} ${delta.mult}×`, dir: delta.dir };
602-
}
603-
return hasBaseline ? { text: "→ flat", dir: "flat" } : undefined;
604-
}
605-
606590
export function ReportMetricRow({
607591
label,
608592
value,

apps/webapp/app/components/dashboard-agent/suggested-prompts/dismissal.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// different chips can't clobber each other's write.
33
const KEY_PREFIX = "tdev:dashboard-agent:prompt-dismissed:";
44

5-
const dismissedPromptStorageKey = (promptId: string) => `${KEY_PREFIX}${promptId}`;
6-
75
export function readDismissedPromptIds(): string[] {
86
if (typeof window === "undefined") return [];
97
try {
@@ -17,12 +15,3 @@ export function readDismissedPromptIds(): string[] {
1715
return [];
1816
}
1917
}
20-
21-
function writeDismissedPromptId(promptId: string): void {
22-
if (typeof window === "undefined") return;
23-
try {
24-
window.localStorage.setItem(dismissedPromptStorageKey(promptId), "1");
25-
} catch {
26-
/* storage full or blocked — the dismissal just doesn't persist */
27-
}
28-
}

0 commit comments

Comments
 (0)