Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ function NewApiKeyDialog({
}

if (actionData?.ok && actionData.action === "create") {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Suppressed rule react/react-compiler is not configured anywhere, so the directives are inert

.oxlintrc.json enables the react plugin but never configures a react-compiler rule, and no other config in the repo references it (searched *.json/*.js/*.mjs/*.yml). The lint script is plain oxlint with no unused-directive reporting, so these // oxlint-disable-next-line react/react-compiler comments neither suppress anything today nor cause a lint error. They match a pre-existing convention already present in base (e.g. apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.team/route.tsx:973), so this is consistent — but worth confirming that the intended rule/plugin will actually be enabled, otherwise the annotations are documentation only.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

setCreatedApiKey(actionData.apiKey);
} else if (actionData && !actionData.ok) {
setShowError(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ function PurchaseBranchesModal({
"ok" in data &&
data.ok
) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setOpen(false);
}
}, [fetcher.state, fetcher.data]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ function PurchaseConcurrencyModal({
const [open, setOpen] = useState(false);
useEffect(() => {
if (purchaseSucceeded) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setOpen(false);
setSearchParams((s) => {
s.delete("success");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ function useContainerWidth(initialWidth = 1280) {

useEffect(() => {
measureWidth();
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setMounted(true);

const element = containerRef.current;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ function RenameDashboardDialog({ title }: { title: string }) {
// Close dialog when navigation completes
useEffect(() => {
if (navigation.state === "idle") {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsOpen(false);
}
}, [navigation.state]);
Expand Down Expand Up @@ -750,6 +751,7 @@ function DeleteDashboardDialog({ title }: { title: string }) {
// Close dialog when navigation completes
useEffect(() => {
if (navigation.state === "idle") {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsOpen(false);
}
}, [navigation.state]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export default function Page() {

const abortController = new AbortController();

// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setLogs([]);
setStreamError(null);
setIsStreaming(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ function EnvironmentVariablesListPage({
const [isVirtualized, setIsVirtualized] = useState(false);

useLayoutEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsVirtualized(shouldVirtualize);
}, [shouldVirtualize]);

Expand Down Expand Up @@ -815,6 +816,7 @@ function EditEnvironmentVariablePanel({
// Close dialog on successful submission
useEffect(() => {
if (lastSubmission?.success && fetcher.state === "idle") {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsOpen(false);
}
}, [lastSubmission?.success, fetcher.state]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ function LogsList({

// Clear accumulated logs immediately when filters change (for instant visual feedback)
useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setAccumulatedLogs([]);
setNextCursor(undefined);
// Preserve log selection from URL param, clear if not present
Expand All @@ -327,6 +328,7 @@ function LogsList({

// Populate accumulated logs when new data arrives
useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setAccumulatedLogs(list.logs);
setNextCursor(list.pagination.next);
}, [list.logs, list.pagination.next]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ function OverrideDialog({
// Reset when dialog opens
useEffect(() => {
if (open) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setEditedContent(content);
setCommitMessage("");
setModel(currentOverrideModel ?? prompt.defaultModel ?? "");
Expand Down Expand Up @@ -1332,6 +1333,7 @@ function GenerationsTab({
// Append fetched rows when fetcher completes
useEffect(() => {
if (fetcher.data && fetcher.state === "idle") {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setGenerations((prev) => {
const existingIds = new Set(prev.map((g) => g.span_id));
const newRows = fetcher.data!.generations.filter((g) => !existingIds.has(g.span_id));
Expand Down Expand Up @@ -1422,6 +1424,7 @@ function GenerationsTab({
const [showSpinner, setShowSpinner] = useState(false);
useEffect(() => {
if (!isLoadingMore) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setShowSpinner(false);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@ function EnvironmentPauseResumeButton({

useEffect(() => {
if (navigation.state === "loading" || navigation.state === "idle") {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsOpen(false);
}
}, [navigation.state]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ function useConcurrencyKeys(opts: {
}, [body]);

useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
load();
return () => abortRef.current?.abort();
}, [load]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@ function TimelineView({
const [duration, setDuration] = useState(queueAdjustedNs(totalDuration, queuedDuration));
useEffect(() => {
if (rootSpanStatus !== "executing" || !rootStartedAt) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setDuration(queueAdjustedNs(totalDuration, queuedDuration));
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export function useRunsLiveReload({
// Single reset path: new loader data or changed filters re-baseline both the
// visible rows and new-run tracking.
useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setVisibleRuns(runs);
resetNewRunsTracking();
}, [runs, searchKeyWithoutPagination, resetNewRunsTracking]);
Expand All @@ -202,6 +203,7 @@ export function useRunsLiveReload({
const data = runsPollFetcher.data;
if (!data?.runs.length) return;

// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setVisibleRuns((currentRuns) => patchVisibleRunsWithLiveUpdates(currentRuns, data.runs));
}, [runsPollFetcher.data]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ export default function IntegrationsSettingsPage() {
if (onboardingData && vercelFetcher.state === "idle") {
// Data is loaded, ensure modal is open (query param takes precedence)
if (!isModalOpen) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
openVercelOnboarding();
}
} else if (vercelFetcher.state === "idle" && !hasVercelFetcherData) {
Expand Down Expand Up @@ -289,6 +290,7 @@ export default function IntegrationsSettingsPage() {
if (hasQueryParam && !isModalOpen) {
// Query param is present but modal is closed, open it
// This ensures the modal stays open during the onboarding flow
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
openVercelOnboarding();
}
}, [hasQueryParam, isModalOpen, openVercelOnboarding]);
Expand All @@ -298,6 +300,7 @@ export default function IntegrationsSettingsPage() {
if (hasQueryParam && onboardingData && vercelFetcher.state === "idle") {
// Data loaded and query param is present, ensure modal is open
if (!isModalOpen) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
openVercelOnboarding();
}
}
Expand Down Expand Up @@ -442,6 +445,7 @@ function BuildSettingsForm({ buildSettings }: { buildSettings: BuildSettings })
buildSettingsValues.installCommand !== (buildSettings?.installCommand || "") ||
buildSettingsValues.triggerConfigFilePath !== (buildSettings?.triggerConfigFilePath || "") ||
buildSettingsValues.useNativeBuildServer !== nativeBuildServerEnabled;
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setHasBuildSettingsChanges(hasChanges);
}, [buildSettingsValues, buildSettings, nativeBuildServerEnabled]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ function ScheduleSheet({

// Always reopen in inspect mode.
useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setMode("inspect");
}, [openScheduleId]);

Expand Down Expand Up @@ -693,6 +694,7 @@ function ScheduleSheet({
handledUpdateRef.current = data;
if (data.ok) {
toast.success(data.message ?? "Schedule updated");
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setMode("inspect");
if (detailPath) loadScheduleDetail(detailPath);
revalidator.revalidate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,7 @@ function RunTemplatesPopover({

useEffect(() => {
if (lastSubmission && "success" in lastSubmission && lastSubmission.success === true) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsDeleteDialogOpen(false);
}
}, [lastSubmission]);
Expand Down Expand Up @@ -1772,6 +1773,7 @@ function CreateTemplateModal({

useEffect(() => {
if (lastSubmission && "success" in lastSubmission && lastSubmission.success === true) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsModalOpen(false);
setShowCreatedSuccessMessage(true);
clearTimeout(successMessageTimeoutRef.current);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ function SetSecretDialog({
// Close on a successful save; the loader revalidates and the state flips to "Set".
useEffect(() => {
if (fetcher.state === "idle" && fetcher.data?.success) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setOpen(false);
}
}, [fetcher.state, fetcher.data]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ function useOverrideDraft<T>(serverValue: T): {
const [override, setOverride] = useState<{ value: T } | null>(null);
useEffect(() => {
// Server matches the pending edit → clear the override.
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setOverride((current) => (current && Object.is(current.value, serverValue) ? null : current));
}, [serverValue]);
const value = override ? override.value : serverValue;
Expand Down Expand Up @@ -419,6 +420,7 @@ export default function Page() {

useEffect(() => {
if (portalFetcher.data?.ok && portalFetcher.data.url) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setPortalUrl(portalFetcher.data.url);
}
}, [portalFetcher.data]);
Expand Down Expand Up @@ -917,6 +919,7 @@ function DirectorySyncSection({
// server value so polled-in groups appear and matched overrides drop.
const [draftGroupRoles, setDraftGroupRoles] = useState<Record<string, string>>({});
useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setDraftGroupRoles((current) => {
const next: Record<string, string> = {};
for (const g of directorySync.groups) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ export function PurchaseSeatsModal({
"ok" in data &&
data.ok
) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setOpen(false);
}
}, [fetcher.state, fetcher.data]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ export default function Page() {

useEffect(() => {
const nonOther = workingOnOptions.filter((o) => o !== WORKING_ON_OTHER);
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setShuffledWorkingOn([...shuffleArray(nonOther), WORKING_ON_OTHER]);

const nonOtherGoals = goalOptions.filter((o) => o !== GOALS_OTHER);
Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/routes/account._index/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export default function Page() {
const [contrastPreview, setContrastPreview] = useState(contrast);
useEffect(() => {
if (contrastFetcher.state === "idle") {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setContrastPreview(contrast);
document.documentElement.style.setProperty("--theme-contrast", String(contrast / 100));
}
Expand Down
2 changes: 2 additions & 0 deletions apps/webapp/app/routes/admin.feature-flags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,14 @@ export default function AdminFeatureFlagsRoute() {
editable[key] = value;
}
}
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setValues({ ...editable });
setInitialValues({ ...editable });
}, [globalFlags, unlocked]);

useEffect(() => {
if (saveFetcher.data?.success) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setSaveError(null);
setConfirmOpen(false);
} else if (saveFetcher.data?.error) {
Expand Down
2 changes: 2 additions & 0 deletions apps/webapp/app/routes/admin.queue-metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default function AdminQueueMetricsRoute() {
const handledSaveDataRef = useRef(saveFetcher.data);

useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setEnabled(controls.enabled);
setSampleRate(String(controls.sampleRate));
}, [controls.enabled, controls.sampleRate]);
Expand All @@ -76,6 +77,7 @@ export default function AdminQueueMetricsRoute() {
handledSaveDataRef.current = saveFetcher.data;

if (saveFetcher.data.success) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setError(null);
revalidate();
} else if (saveFetcher.data.error) {
Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/routes/confirm-basic-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ export default function Page() {

useEffect(() => {
const nonOtherReferral = referralSourceOptions.filter((r) => r !== "Other");
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setShuffledReferralSources([...shuffleArray(nonOtherReferral), "Other"]);

const nonOtherRoles = roleOptions.filter((r) => r !== "Other");
Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/routes/login.mfa/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export default function LoginMfaPage() {
// Reset hideError when a new error appears
React.useEffect(() => {
if (rawMfaError) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setHideError(false);
}
}, [rawMfaError]);
Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/routes/resources.branches.create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export function NewBranchPanel({
s.delete("dialogClosed");
return s;
});
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsOpen(false);
}
}, [searchParams, setSearchParams]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ export function ConnectGitHubRepoModal({
const params = new URLSearchParams(searchParams);

if (params.get("openGithubRepoModal") === "1") {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsModalOpen(true);
params.delete("openGithubRepoModal");
setSearchParams(params);
Expand All @@ -450,6 +451,7 @@ export function ConnectGitHubRepoModal({

useEffect(() => {
if (lastSubmission && "success" in lastSubmission && lastSubmission.success === true) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsModalOpen(false);
}
}, [lastSubmission]);
Expand Down Expand Up @@ -810,6 +812,7 @@ export function ConnectedGitHubRepoForm({
gitSettingsValues.stagingBranch !==
(connectedGitHubRepo.branchTracking?.staging?.branch || "") ||
gitSettingsValues.previewDeploymentsEnabled !== connectedGitHubRepo.previewDeploymentsEnabled;
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setHasGitSettingsChanges(hasChanges);
}, [gitSettingsValues, connectedGitHubRepo]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ export function useRealtimeStream(resourcePath: string, startIndex?: number) {
const [isConnected, setIsConnected] = useState(false);

useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setChunks([]);
setError(null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,7 @@ function VercelSettingsPanel({
useEffect(() => {
if (!data?.authInvalid && !hasError && !data && !hasFetched) {
load(vercelResourcePath(organizationSlug, projectSlug, environmentSlug));
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setHasFetched(true);
}
}, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ export function TierFree({
const [isLackingFeaturesChecked, setIsLackingFeaturesChecked] = useState(false);

useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsDialogOpen(false);
}, [subscription]);

Expand Down Expand Up @@ -493,6 +494,7 @@ export function TierHobby({
const [isDialogOpen, setIsDialogOpen] = useState(false);

useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsDialogOpen(false);
}, [subscription]);

Expand Down Expand Up @@ -635,6 +637,7 @@ export function TierPro({
const [isDialogOpen, setIsDialogOpen] = useState(false);

useEffect(() => {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsDialogOpen(false);
}, [subscription]);

Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/routes/vercel.onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ export default function VercelOnboardingPage() {
// Reset isInstalling when navigation returns to idle (e.g. on error)
useEffect(() => {
if (navigation.state === "idle" && isInstalling) {
// oxlint-disable-next-line react/react-compiler -- This effect intentionally synchronizes route state after an external or lifecycle change.
setIsInstalling(false);
}
}, [navigation.state, isInstalling]);
Expand Down