chore: Update CI workflow to install Node.js for build steps
Some checks failed
CI / skip-ci-check (push) Successful in 1m25s
CI / skip-ci-check (pull_request) Successful in 1m25s
CI / lint-and-type-check (push) Successful in 2m2s
CI / python-lint (push) Successful in 1m51s
CI / lint-and-type-check (pull_request) Has been cancelled
CI / python-lint (pull_request) Has been cancelled
CI / test-backend (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / secret-scanning (pull_request) Has been cancelled
CI / dependency-scan (pull_request) Has been cancelled
CI / sast-scan (pull_request) Has been cancelled
CI / workflow-summary (pull_request) Has been cancelled
CI / test-backend (push) Successful in 2m33s
CI / build (push) Failing after 2m11s
CI / secret-scanning (push) Successful in 1m40s
CI / dependency-scan (push) Successful in 1m31s
CI / sast-scan (push) Successful in 2m54s
CI / workflow-summary (push) Successful in 1m25s

This commit modifies the CI workflow configuration to include steps for installing Node.js, ensuring that the necessary environment is set up for subsequent build actions. Additionally, it updates the PhotoViewer component to use the correct type for the slideshow timer reference, and introduces a new function for unmatching faces in the Modify page. Unused code comments in the Tags page are also updated for clarity. These changes enhance the development workflow and maintain code quality.
This commit is contained in:
Tanya 2026-01-06 14:04:22 -05:00
parent 75a4dc7a4f
commit 36b84fc355
4 changed files with 48 additions and 5 deletions

View File

@ -97,6 +97,12 @@ jobs:
container:
image: python:3.12-slim
steps:
- name: Install Node.js for checkout action
run: |
apt-get update && apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
- name: Check out code
uses: actions/checkout@v4
@ -147,6 +153,12 @@ jobs:
DATABASE_URL_AUTH: postgresql+psycopg2://postgres:postgres@postgres:5432/punimtag_auth_test
REDIS_URL: redis://redis:6379/0
steps:
- name: Install Node.js for checkout action
run: |
apt-get update && apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
- name: Check out code
uses: actions/checkout@v4

View File

@ -36,7 +36,7 @@ export default function PhotoViewer({ photos, initialIndex, onClose }: PhotoView
// Slideshow state
const [isPlaying, setIsPlaying] = useState(false)
const [slideshowInterval, setSlideshowInterval] = useState(3) // seconds
const slideshowTimerRef = useRef<NodeJS.Timeout | null>(null)
const slideshowTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)
// Favorite state
const [isFavorite, setIsFavorite] = useState(false)

View File

@ -547,6 +547,33 @@ export default function Modify() {
})
}
const confirmUnmatchFace = async () => {
if (!unmatchConfirmDialog || !selectedPersonId || !unmatchConfirmDialog.faceId) return
try {
setBusy(true)
setError(null)
setUnmatchConfirmDialog(null)
// Unmatch the single face
await facesApi.batchUnmatch({ face_ids: [unmatchConfirmDialog.faceId] })
// Reload people list to update face counts
const peopleRes = await peopleApi.listWithFaces(lastNameFilter || undefined)
setPeople(peopleRes.items)
// Reload faces
await loadPersonFaces(selectedPersonId)
setSuccess('Successfully unlinked face')
setTimeout(() => setSuccess(null), 3000)
} catch (err: any) {
setError(err.response?.data?.detail || err.message || 'Failed to unmatch face')
} finally {
setBusy(false)
}
}
const confirmBulkUnmatchFaces = async () => {
if (!unmatchConfirmDialog || !selectedPersonId || selectedFaces.size === 0) return

View File

@ -414,7 +414,9 @@ export default function Tags() {
}
}
// Save pending changes
// Save pending changes (currently unused, kept for future use)
// @ts-expect-error - Intentionally unused, kept for future use
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _saveChanges = async () => {
const pendingPhotoIds = new Set([
...Object.keys(pendingTagChanges).map(Number),
@ -483,7 +485,9 @@ export default function Tags() {
}
}
// Get pending changes count
// Get pending changes count (currently unused, kept for future use)
// @ts-expect-error - Intentionally unused, kept for future use
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _pendingChangesCount = useMemo(() => {
const additions = Object.values(pendingTagChanges).reduce((sum, ids) => sum + ids.length, 0)
const removals = Object.values(pendingTagRemovals).reduce((sum, ids) => sum + ids.length, 0)
@ -1549,7 +1553,7 @@ function PhotoTagDialog({
// Bulk Tag Dialog Component
function BulkTagDialog({
folderPath,
folderPath: _folderPath,
folder,
tags,
pendingTagChanges,
@ -1559,7 +1563,7 @@ function BulkTagDialog({
onRemoveTag,
getPhotoTags,
}: {
folderPath: string // eslint-disable-line @typescript-eslint/no-unused-vars
folderPath: string
folder: FolderGroup | undefined
tags: TagResponse[]
pendingTagChanges: Record<number, number[]>