Commit Graph
479 Commits
Author SHA1 Message Date
Varun Raj a9d2adc6a1 fix: measure trip gap tolerance in real calendar days, not array-index distance
clusterTrips's gap check compared array-index adjacency between
DaySignal entries. Since `days` only contains dates with >=1 photo
(GROUP BY DATE(...) with no zero-photo rows), two trips separated by
months with no photos in between were array-adjacent (gapLen=0) and
got merged into one bogus trip. Compare actual elapsed calendar days
between the last and next away day instead.
2026-07-10 15:53:04 +00:00
David Gil Pérez 09decb7198 fix(potential-trips): pre-fill suggested album name reliably
The previous guard 'only set if formData.albumName is empty' lost races against the dialog mount cycle: in some orderings the formData starts empty, the effect fires while config.suggestedAlbumName is undefined, then later when the suggestion arrives the guard refuses to update because prev.albumName == ''. Net effect: the user clicks a trip, selects photos, opens Add to Album, and the Album Name field is empty.

Track the last applied suggestion via a ref and write the value whenever the suggestion changes to a new non-empty string. Doesn't overwrite mid-typing because the suggestion only flips when the user picks a different trip; doesn't overwrite when the user picks the same trip twice; works on mount-after-suggestion (which was the broken path).
2026-04-20 23:19:24 +02:00
David Gil Pérez 4439367f4f feat(potential-trips): filter trip assets by trip city
The trip-assets endpoint was returning every orphan asset in the date range, so screenshots, photos taken at the airport coming back, or anything else timestamped during the trip days mixed in. The right panel ended up showing photos from multiple cities for one trip selection.

Pass the trip's dominant city through the context to the asset fetcher and add an optional 'city' filter on /api/albums/potential-trip-assets:
  WHERE e.city = :city OR e.city IS NULL

NULL is included so we don't lose photos taken during the trip whose EXIF lacks a city tag (no GPS, screenshots edited later, older devices, etc.). When no city is provided (single-day Days view, or a trip whose city couldn't be resolved) the previous date-only behaviour is preserved.
2026-04-20 22:50:27 +02:00
David Gil Pérez 01499e7c4e feat(potential-albums): add Trips view that groups consecutive away days
Closes #267 (proposal accepted in spirit; happy to iterate on review).

Today the Potential Albums page groups orphan assets by single day, which is great for one-off events but tedious for trips: a 7-day Lisbon holiday shows up as 7 separate rows that the user has to merge by hand. This adds a sibling view that detects multi-day stretches of photos taken away from the user's "home" location and surfaces each as one row, with a sensible suggested name like `20180401 - Lisboa`.

What's in this PR:

Backend
- `src/helpers/trips.helper.ts` — pure TS clustering helper (haversine distance, home detection by mode-city + GPS centroid, linear-scan trip extraction with configurable gap tolerance and min-trip-days). Easy to unit-test.
- `src/pages/api/albums/potential-trips.ts` — per-day aggregation in PG (count + lat/lon centroid + MODE() city/country) → call helper → return `{ home, trips[] }`.
- `src/pages/api/albums/potential-trip-assets.ts` — orphan assets in a date range, with the same shape the existing single-day endpoint returns. Date format validated to keep the literal-interpolated SQL safe.

Frontend
- `src/components/albums/potential-albums/PotentialTrips.tsx` — list rows, click a trip to load its assets in the existing right panel.
- `src/components/albums/AlbumSelectorDialog.tsx` — accepts a new `defaultName` prop and pre-fills the "Create New" tab from `config.suggestedAlbumName`. User can still edit.
- `src/pages/albums/potential-albums.tsx` — Days/Trips Tabs at the top of the left panel. Trips tab passes `{startDate, endDate, suggestedAlbumName}` into the shared selection context; the existing `PotentialAlbumsAssets` component now fetches a date range when `endDate` is set.
- `src/contexts/PhotoSelectionContext.tsx` — adds `endDate` and `suggestedAlbumName` to the shared config.

Defaults match the issue:
- home radius 50 km
- min trip days 2
- gap tolerance 2 (transit days, days with no photos)
- name format `YYYYMMDD - {city}` (or `YYYYMMDD - Trip` if no city resolved)

Libraries with no GPS at all fall through to the existing Days view — no regression.

Open for the maintainer:
- Whether to also expose the three thresholds in Settings (left out here to keep the PR small; trivial follow-up).
- Whether the trips endpoint should cache its result per-user (some libraries are large).
2026-04-20 22:36:10 +02:00
Sai charan GuntupalliandGitHub 04edb99217 Merge pull request #261 from immich-power-tools/fix/update-compose
feat: add volume configuration for immich power tools in docker-compo…
2026-04-13 14:45:34 +05:30
sai80082 085d4fb346 feat: add volume configuration for immich power tools in docker-compose files 2026-04-13 14:40:39 +05:30
Sai charan GuntupalliandGitHub 15f6966ffc Merge pull request #253 from jicetus/reference-files
Updates power-tools image path referenced
2026-04-09 10:05:23 +05:30
jicetus c91a251392 Update immich-power-tools image path used
This updates the container image to the official immich-power-tools repository; no other configuration changes were made.

Updated from previous (now deprecated) image references. Some files were still referencing the old image instance ´ghcr.io/varun-raj/immich-power-tools:latest´, updated them to ´ghcr.io/immich-power-tools/immich-power-tools:latest´ across the project (README.md, docker-compose.yml, and docker-compose-all-immich.yml).
2026-04-08 23:32:10 +02:00
Sai charan GuntupalliandGitHub b47fa4b2d8 Add GNU AGPL v3 license
Added the GNU Affero General Public License version 3 to the project.
2026-04-08 21:30:47 +05:30
Varun Raj ManoharanandGitHub 5795906bec Merge pull request #252 from immich-power-tools/feat/smart-auto-albums
feat: workflow UI improvements, dark mode, and Docker fix
2026-04-08 20:49:06 +05:30
Varun 661967e919 fix: pre-create /app/data directory in Dockerfile for nextjs user permissions 2026-04-08 20:48:37 +05:30
Varun Raj ManoharanandGitHub aa563e2ac2 Merge pull request #251 from immich-power-tools/feat/smart-auto-albums
Design and UI fixes
2026-04-08 20:23:47 +05:30
Varun d2fb4be2b3 feat: workflow node details, dark mode controls, asset preview fixes
- Show full condition details on IF/Switch nodes with person thumbnails
- Show album name and tag on action nodes
- Add dark mode support for React Flow controls via colorMode
- Center images in lightbox preview
- Fix leaflet marker icons for both Webpack and Turbopack bundlers
2026-04-08 20:00:57 +05:30
Varun Raj ManoharanandGitHub c40334b764 Merge pull request #250 from immich-power-tools/feat/nextcloud-import
feat: add Nextcloud support for shared links and asset import
2026-04-08 19:30:38 +05:30
Varun 6c310eb07c feat: improve previous imports list with status borders and pill badges 2026-04-08 19:30:11 +05:30
Varun 0ede3927f8 feat: people card redesign - quick hide button, dropdown menu, grey border 2026-04-08 13:34:31 +05:30
Varun 36ea092ae9 refactor: remove unused Managed API Keys section from settings 2026-04-08 11:28:12 +05:30
Varun 792e501ab8 feat: combine schedule and webhook into single triggers popover 2026-04-08 11:18:32 +05:30
Varun e47e99ccfc feat: import API key, people card redesign, birthday popover, autocomplete portal
- Add import_api_key setting with auto-generate endpoint and settings UI
- Import job runner uses import API key when available, falls back to session
- Show ApiKeyGate empty state in both workflow and import pages when key missing
- Replace workflow API key warning popover with full gate overlay
- Redesign person cards: square avatar, hover action toolbar, cleaner layout
- Birthday field now uses popover with calendar + natural language input
- Fix autocomplete dropdown clipping inside overflow-hidden cards via portal
- People grid column slider persisted to localStorage (min 3, max 20)
2026-04-08 09:53:09 +05:30
Varun 6a5b2b442a feat: asset delete in preview, workflow api key auto-generate, UI polish
Add delete with confirm dialog to asset lightbox (always visible, handles
deletion internally with local state update). Force dark theme on asset
info panel and fix text color inheritance. Add edge-to-edge image display
in lightbox by removing slide padding. Show open-in-immich link on hover
only. Add workflow page title breadcrumb. Add one-click workflow API key
generation that creates the key in Immich and saves it automatically.
2026-04-08 09:22:55 +05:30
Varun e0dd64a95e feat: sidebar beta badge for workflows, settings and profile improvements
Add beta badge to Workflows in the sidebar. Include settings page
improvements, workflow detail updates, profile info and sidebar
nav refinements, and validate-api-key endpoint.
2026-04-08 08:48:28 +05:30
sai80082 d7f19d8813 feat: add Nextcloud support for shared links and asset import
- Implemented Nextcloud shared link detection and processing in the import workflow.
- Created a new processor for handling Nextcloud shared links, including asset downloading and uploading to Immich.
- Enhanced existing import functionality to support platform differentiation between Immich and Nextcloud.
- Added utility functions for parsing file names and guessing content types.
- Updated thumbnail and video endpoints to accommodate Nextcloud's API structure.
- Modified the import shared page to handle Nextcloud URLs and passwords.
- Refactored asset upload logic to streamline the process for both platforms.
2026-04-08 00:38:43 +05:30
Varun Raj ManoharanandGitHub 89b9b1c74e Merge pull request #249 from immich-power-tools/feat/smart-auto-albums
Smart auto albums and workflows 🚀
2026-04-07 23:43:57 +05:30
Varun 937f64a57e fix: sidebar redesign and api key validation
Signed-off-by: Varun <varun@skcript.com>
2026-04-07 23:31:03 +05:30
Varun 15f90121a1 feat: redesign import-shared page and support password-protected links
Redesign import-shared with sticky import bar, dense gallery grid,
progress bar, and cleaner landing state. Add password-protected
shared link support - detects 401 "Password required" from Immich
and shows a password input. Also reduce asset grid spacing and
replace "Open in Immich" text with a link icon.
2026-04-07 23:12:34 +05:30
Varun 2ff863b296 feat: redesign analytics exif page with sectioned layout and bar charts
Reorganize the exif analytics page into labeled sections (Camera & Gear,
Location, Technical, Storage) with icon headers. Replace donut charts
with horizontal bar charts for multi-category EXIF distributions.
Improve heatmap with emerald color scale, day labels, and legend.
Add polished stat cards with icons and skeleton loading states.
2026-04-07 22:55:07 +05:30
Varun 6dff749479 feat: redesign workflow list with enriched data
- API returns node counts, total runs, and last run status per workflow
- List view with status icon, trigger badges, stats, and last run info
- Human-readable schedule labels (Every 6h, Every 30m)
- Last run shows status icon, asset count, and relative time
- Actions appear on hover for cleaner default state
- Improved empty state
2026-04-07 21:14:56 +05:30
Varun d0a7894a25 feat: per-user settings, workflow API key, cron scheduler, and engine logging
- Add ownerId to settings table for per-user key-value storage
- Add settings KV API endpoint scoped by user
- Add workflow API key config in settings page
- Action executor uses per-user workflow API key, falls back to session auth
- Bootstrap cron scheduler on server start via instrumentation hook
- Re-register/unregister cron on workflow enable/disable/delete
- Downgrade node-cron to v3 for Turbopack compatibility
- Add structured console logs to workflow engine for all steps
- Enabled toggle saves immediately to server
- Schedule popover saves immediately to server
- Use react-hot-toast instead of shadcn toast in workflow editor
2026-04-07 20:38:59 +05:30
Varun 4b6ec60cb9 merge: sync with prerelease branch
Resolved package.json conflicts, keeping @xyflow/react and node-cron
while adopting newer versions from prerelease for other dependencies.
2026-04-07 20:05:53 +05:30
Varun e5ae85e1d5 fix: toast fix
Signed-off-by: Varun <varun@skcript.com>
2026-04-07 20:03:22 +05:30
Varun c7a7ea3023 feat: add smart auto-albums with visual workflow editor
- Visual node-based workflow editor using React Flow
- Asset triggers: new asset, asset updated, all assets (with lookback buffer)
- Logic nodes: if/switch with combinable conditions (person, location, date, camera, EXIF, favorites, album membership)
- Action nodes: create album, add/remove from album, favorite, unfavorite, archive, tag
- Workflow-level triggers: manual run, cron schedule, webhook
- Debug mode: dry run with step-by-step logs and asset previews
- Run history with per-node asset tracking
- Run detail page with annotated read-only graph
- Processed asset tracking to prevent duplicate processing
- Multi-person picker with face thumbnails
- Album picker dropdown for actions
- JSON import/export for workflow sharing
- Workflow list page with create, delete, enable/disable
2026-04-07 19:20:43 +05:30
Varun Raj ManoharanandGitHub 7a3a8713f1 Merge pull request #248 from immich-power-tools/feat/upgrade-nextjs
Feat/upgrade nextjs
2026-04-07 19:19:56 +05:30
sai80082 fa98a2595b fix: update Dockerfile and bun.lock 2026-04-07 19:13:37 +05:30
sai80082 a9f6e92a97 fix: update AssetGrid to remove tags and add link to open in Immich directly in photo album 2026-04-07 00:25:15 +05:30
sai80082 2dd783f949 Merge branch 'prerelease' into feat/upgrade-nextjs 2026-04-07 00:20:50 +05:30
sai80082 aefc94b89e fix: replace leaflet-defaulticon-compatibility with direct icon imports for Turbopack compatibility 2026-04-07 00:15:45 +05:30
sai80082 6569aa4427 fix: replace react-grid-gallery with react-photo-album for React 19 compatibility 2026-04-07 00:12:03 +05:30
Varun Raj ManoharanandGitHub 02d6caac4a Merge pull request #247 from immich-power-tools/feat/orphan-finder
Orphan finder & enhanced lightbox with asset info panel
2026-04-06 20:19:16 +05:30
Varun e814793190 merge: resolve conflicts with prerelease branch 2026-04-06 20:18:11 +05:30
Varun 54eeb73b66 feat: hide and edit people option in the asset dialog
Signed-off-by: Varun <varun@skcript.com>
2026-04-06 20:13:16 +05:30
Varun a2916b6ee7 feat: added orphan assets and new info panel for the asset dialog
Signed-off-by: Varun <varun@skcript.com>
2026-04-06 19:55:38 +05:30
Varun Raj ManoharanandGitHub 1047a1b9d8 Merge pull request #245 from immich-power-tools/april-fixes
fix: copy button in share assets fix
2026-04-06 19:43:02 +05:30
Varun Raj ManoharanandGitHub 836fe7a373 Merge pull request #242 from immich-power-tools/feat/db-and-apikeys
Feat/db and apikeys
2026-04-06 19:42:15 +05:30
Varun 11e88526c7 fix: copy button in share assets fix
Signed-off-by: Varun <varun@skcript.com>
2026-04-06 19:16:04 +05:30
sai80082 4f7e770cf3 chore: update ESLint configuration and dependencies, remove experimental instrumentationHook from Next.js config, and adjust package scripts
- Added ESLint configuration file with Next.js and Remotion settings.
- Removed experimental instrumentationHook from next.config.mjs.
- Updated package.json scripts to use ESLint directly and enabled turbopack for development.
- Bumped various dependencies including Next.js, React, and Radix UI components.
- Changed searchTimer initialization to use undefined for better clarity in multiple components.
2026-04-06 17:32:46 +05:30
Varun da3f865450 feat: api key fix and the import status and history dialog
Signed-off-by: Varun <varun@skcript.com>
2026-04-06 09:42:42 +05:30
VarunandClaude Sonnet 4.6 550199d4f1 fix: make migrations and job queue work in Docker standalone build
- Move instrumentation.ts to src/ so Next.js picks it up (required when using src/ layout)
- Enable experimental.instrumentationHook in next.config.mjs (required in Next.js 14)
- Switch Dockerfile deps stage from npm to bun to match lockfile
- Explicitly copy @libsql and libsql into standalone runner — Next.js file tracing
  misses dynamically required native modules (require(`@libsql/${target}`))

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 21:51:00 +05:30
VarunandClaude Sonnet 4.6 5169ae3ebd fix: copy migration files into Docker runner image for standalone output
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 21:13:17 +05:30
Varun 37a168cf2f chore: gitignore docs/plans 2026-04-03 21:10:44 +05:30
Varun 48e5f009f0 feat: merge album details and destination into single card 2026-04-03 21:08:58 +05:30