fix(ci): report client warnings without linting twice

Use the completed ESLint results to locate warnings in changed files. Rechecking alternate source versions still exhausted the runner, even in sequence.

Reset transient sheet state without a second render from an effect.
This commit is contained in:
Maurice
2026-12-04 09:59:06 +01:00
parent 814e4f047e
commit b06fa93c4a
5 changed files with 48 additions and 99 deletions
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react'
import { useState } from 'react'
import { Car, ChevronLeft, Fuel, Route, Settings2, Zap } from 'lucide-react'
import MSheet from '../../../components/MSheet'
import MToggle from '../../../components/MToggle'
@@ -52,7 +52,7 @@ export default function MRtInfoSheet({ planner, shell }: MTripSheetsProps) {
const open = shell.sheet?.id === 'rtinfo'
const tripId = planner.tripId
const [editing, setEditing] = useState(false)
useEffect(() => { if (!open) setEditing(false) }, [open])
if (!open && editing) setEditing(false)
const unitSetting = useSettingsStore(s => s.settings.distance_unit)
const unit: DistanceUnit = unitSetting === 'imperial' ? 'imperial' : 'metric'
@@ -1,4 +1,4 @@
import { useEffect, useState, type ReactNode } from 'react'
import { useState, type ReactNode } from 'react'
import { CalendarPlus, ChevronRight, FileDown, MapPinned, Share2, UserRound } from 'lucide-react'
import MSheet from '../../../components/MSheet'
import MIcsSubscribeSheet from './MIcsSubscribeSheet'
@@ -22,12 +22,10 @@ export default function MExportSheet({ planner, shell }: MTripSheetsProps) {
const dayNotes = useTripStore(s => s.dayNotes)
const [subscribeOpen, setSubscribeOpen] = useState(false)
const [formatsOpen, setFormatsOpen] = useState(false)
useEffect(() => {
if (!open) {
setSubscribeOpen(false)
setFormatsOpen(false)
}
}, [open])
if (!open && (subscribeOpen || formatsOpen)) {
setSubscribeOpen(false)
setFormatsOpen(false)
}
// The iOS Home Screen app hands the PDF to Safari, which lands here with ?export=pdf.
useExportDeepLink(() => shell.openSheet('export'))
// Fed the way the desktop dialog feeds it: the store's assignments, and the export
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState } from 'react'
import { useRef, useState } from 'react'
import { Check, ChevronLeft, Link2, Loader2, MapPin, Search, Ticket, TrainFront } from 'lucide-react'
import type { LucideIcon } from 'lucide-react'
import MIconBtn from '../../../components/MIconBtn'
@@ -37,7 +37,12 @@ export default function MFileLinkSheet({ planner, file, onClose, onBack }: MFile
const [busyKey, setBusyKey] = useState<string | null>(null)
const [query, setQuery] = useState('')
useEffect(() => { if (open) setQuery('') }, [open, file?.id])
const fileId = file?.id ?? null
const [previousFileId, setPreviousFileId] = useState(fileId)
if (fileId !== previousFileId) {
setPreviousFileId(fileId)
if (fileId !== null) setQuery('')
}
if (!shown) return <MSheet open={false} onClose={onClose} variant="card" material="glass" />