Commit Graph
100 Commits
Author SHA1 Message Date
REDCODE 3633b418ea feat(ui): add eye toggle button to show/hide password on all password fields 2026-07-11 04:08:19 +02:00
REDCODE 46382e2aed fix(ui): prevent infinite loading loop on cosplayers page with no data
The AuthInfoChanged handler was calling StateHasChanged() during
OnInitializedAsync (fired by JwtTokenRefresher when refreshing the
token during LoadPeople). This conflicted with Blazor's initial
render cycle, leaving the component stuck in a loading state when
the result was empty.

Changes:
- Remove StateHasChanged() from AuthInfoChanged handler (token
  update only, consistent with CosplayerDetail pattern)
- Extract named event handler methods for proper unsubscribe
- Implement IDisposable to unsubscribe from singleton events
- Always assign GetAllAsync result (including empty) to people
2026-07-11 00:32:24 +02:00
REDCODE be7dc9bb91 feat(ui): apply metallic gradient to all buttons and surfaces
- Add gradient-button mixin for color-agnostic metallic button style
- Apply to all .btn-* variants via theme-color loop
- Reset hover lift inside .btn-group / .navbar to prevent button breakout
- Add gradient-surface-deep/shallow mixins for cards, modals, dropdowns
- Apply metallic surface gradients to .card, .card-header, .modal-content,
  .dropdown-menu, .dropdown-item, .list-group-item
- Update gradient-accent to brighter stops (lighten 5% / darken 5%)
- Fix danger color contrast (#f85149 -> #d41111)
- Add --text CSS variable
- Clean up Dockerfile (remove unnecessary libc6/libstdc++6)
- Fix LactoseBaseUrl IP in docker-compose.yml
- Minor UI tweaks: badge spacing in AdminUsers, badge style in SettingRange
2026-07-11 00:23:18 +02:00
REDCODE d010b51687 fix(ui): fix remaining float culture issues in CSS style attributes
- CosplayerDetail.razor: add InvariantCulture to @z (missed in prior fix)
- ProgressBar.razor: add InvariantCulture to seg.Width and Value in width% styles
2026-07-10 23:58:42 +02:00
REDCODE 07c0a15369 fix(ui): fix float values in the cosplayer thumbnail and cosplayer card 2026-07-10 23:36:23 +02:00
REDCODE 220581579b refactor(auth): remove SendWithRefreshAsync, rely solely on JwtTokenRefresher
- Remove SendWithRefreshAsync method from AuthServiceBase (now dead code)
- Replace all 15 SendWithRefreshAsync call sites in 7 services with
  direct Client.XxxAsync calls
- Remove unused using System.Net from AuthServiceBase
- Update AGENTS.md to document JwtTokenRefresher as the sole token
  refresh mechanism
2026-07-10 01:12:31 +02:00
REDCODE 254e98b37b refactor(auth): extract AuthServiceBase, replace retry with re-auth on 401
- Move AuthServiceBase from ServiceBase.cs into its own file
- Replace FetchLoggedUserAsync retry loop with re-authentication on
  failure, then single recursive retry
- Fix override keyword order in App.razor OnInitializedAsync
- Clean up MainLayout.razor inject (unqualified type name)
2026-07-10 01:01:17 +02:00
REDCODE 652143d738 feat: allow users to update own albums and curators to update any album
- Users: changed from blanket Forbid to ownership check (can update own albums)
- Curators: changed from ownership check to full access (can update any album)
2026-07-09 23:46:02 +02:00
REDCODE 7f447077b0 feat: make album name in image previewer an anchor element for native navigation 2026-07-09 23:27:18 +02:00
REDCODE b813c32756 fix(#62): lock body scroll when modal forms open to prevent position:fixed breakage on mobile
- PersonForm and AlbumForm now call lockBodyScroll/unlockBodyScroll via JS
  when Show state changes, preventing the body scroll context from
  interfering with position:fixed on mobile browsers
- added minimal mobile CSS: align-items:flex-start, padding-top, and
  reduced max-height:85vh on modal-content for small viewports
- safe disposal: unlocks body scroll on DisposeAsync if modal was open
2026-07-09 22:54:57 +02:00
REDCODE cdd2e9a1ef fix(#62): use explicit top/left/right/bottom instead of inset, add !important to ensure position:fixed takes effect on mobile 2026-07-09 22:49:24 +02:00
REDCODE 64bee6c92a revert: restore docker-compose.yml — testing-only CORS/baseUrl changes committed by accident 2026-07-09 22:45:21 +02:00
REDCODE 870ebb06f8 fix(#62): move mobile modal fix to global MilkyShot.css — scoped ::deep cannot pierce PersonForm root element
fix(AlbumCard): add null check for Album.Person before rendering link

The ::deep combinator in CosplayerDetail.razor.css cannot target
.modal-overlay rendered by the PersonForm child component because
Blazor's CSS isolation applies the child's scope attribute to its
root, and ::deep only strips the parent's scope — it doesn't match
elements bearing only the child's scope.
2026-07-09 22:43:27 +02:00
REDCODE 2f7cd3d7da fix: resolve UI issues #61, #62, #66
- #61: wrap standalone fallback div in cosplayer-card-img-wrap on
  Cosplayers page so placeholder icon gets proper sizing/positioning
- #62: add mobile breakpoint rule for modal-overlay so edit form
  appears centered on small screens instead of at page bottom
- #66: make cosplayer name in ImagePreview, AlbumDetail, AlbumCard,
  and Home asset tiles a clickable link to /cosplayer/{id}
- add CosplayerIds to AssetPreviewDto and populate via mapper for
  linked navigation from the home page image previewer
2026-07-09 22:36:07 +02:00
REDCODE d1f545bb59 fix(ui): restore progress bar visibility on job rows
d-none d-sm-flex hides the progress bar but also changes its
display from inline to flex on desktop, breaking visibility.
Remove the hide-class — the progress bar is always shown.
2026-07-09 03:31:49 +02:00
REDCODE 584e24d751 fix(ui): replace inline save indicator with Bootstrap toast notification
SettingBox base now uses JS interop to call showToast() which
renders a Bootstrap Toast at the bottom-right corner. Removed
all SaveIndicator RenderFragments and IsSaving/IsSaved state
from the four child components. Toast auto-hides after 2s.
2026-07-09 02:58:01 +02:00
REDCODE ea25eca9fa fix(ui): right-align number inputs, let them grow to fill card width
Replace w-auto with text-end+flex-grow-1 so the number input
right-aligns its value text and adapts its width on narrow
setting cards.
2026-07-09 02:55:03 +02:00
REDCODE b8f0eea848 fix(ui): stack setting card body vertically — description above, control + indicator below
Remove d-flex justify-content-between from all card bodies.
Description always sits above the input/control row, and the save
indicator sits inline on the same row as the control. Removed
mobile-specific stacking workaround and save-indicator CSS class
since layout shift is impossible with this structure.
2026-07-09 02:44:10 +02:00
REDCODE b417f37780 fix(ui): prevent save indicator from shifting adjacent controls
Always render the save indicator container with a fixed 5rem min-width,
only toggle the inner text/color. Previously the conditional Rendering
caused the element to appear-disappear-resize, shifting nearby inputs.
2026-07-09 02:39:39 +02:00
REDCODE f52b684722 fix(ui): prevent layout shift from save indicator width change
Add .save-indicator CSS class with fixed min-width (4rem) and
text-align:right. Apply to all four setting box types so
'Saving...'→'Saved' text change doesn't shift adjacent
controls.
2026-07-09 02:27:00 +02:00
REDCODE 5c15f89f59 fix(ui): stack setting card description and control vertically on mobile
On ≤576px viewports, switch card body from side-by-side to
stacked layout: description text on top, input/slider
control below. Prevents text clipping and control overflow.
2026-07-09 02:26:24 +02:00
REDCODE f2e2997988 fix(ui): reduce password input width on AdminUsers to prevent cell overflow
Tighten password inline-edit input from 80-120px to 60-100px
so it fits alongside confirm/cancel buttons in narrow
mobile table cells.
2026-07-09 02:26:04 +02:00
REDCODE 1589c7fe29 fix(ui): change AdminUsers mobile actions dropdown from dropup to dropdown
dropup opens upward and clips off-screen for the first table rows.
Use standard dropdown (downward) which works correctly for
all row positions.
2026-07-09 02:25:42 +02:00
REDCODE 5e23180c7c fix(ui): prevent JobRow horizontal overflow on mobile portrait
Hide non-essential columns (child summary, dates/progress bar,
elapsed time) on mobile using d-none d-sm-inline/d-sm-flex.
Add flex-wrap to main row for overflow safety on very
narrow viewports.
2026-07-09 02:25:24 +02:00
REDCODE 04d425b88d refactor: replace custom masonry JS with Bootstrap grid + Masonry.js approach
Use Bootstrap's recommended pattern: .row.g-2 container with col-* grid
classes for item widths, Masonry.js with percentPosition:true for
vertical positioning. Extracted infinite scroll observers into separate
infiniteScroll.js. Removed custom column-width JS, imagesLoaded CDN,
and the old masonryObserver.js.
2026-07-09 01:51:38 +02:00
REDCODE ca21dc3dd9 fix(frontend): removed faulty d-flex tag on main object 2026-07-09 00:57:58 +02:00
REDCODE 4ff3b24df8 Merge remote-tracking branch 'gitea/develop' into develop 2026-07-08 23:33:05 +02:00
REDCODE 1da7236d5d fix(frontend): sorts setting by alphabetical 2026-07-08 23:32:46 +02:00
REDCODE 458cf70081 feat: add thousands separators to job status numbers 2026-07-08 02:03:40 +02:00
REDCODE 3d81b7a97e fix: skip existing AlbumAsset relationships in CreateAlbumsJob to prevent duplicate key violations on re-run 2026-07-08 01:50:39 +02:00
REDCODE 03f52cfb5b feat: add statistics page with aggregate asset/user/system stats via fast DB queries 2026-07-08 01:49:50 +02:00
REDCODE 4b0a6df5dd fix: per-batch progress messages and counting bug in album/person jobs 2026-07-08 01:30:33 +02:00
REDCODE 744bc9e4d0 feat: improve logging and progress reporting for album/person jobs 2026-07-08 01:23:25 +02:00
REDCODE 76ba4fd74a configuration changes 2026-07-08 01:08:00 +02:00
REDCODE 132e3d2930 fix: make job cancellation work for all job states and types
Job.Cancel() now handles queued jobs (cts null) by setting Canceled status and firing events directly. ContinueWith checks t.IsCanceled to catch ThrowIfCancellationRequested patterns. cts is now disposed after job completion. CreatePersonsJob, CreateAlbumsJob, and IntegrityCheckJob now catch OperationCanceledException and set proper Canceled state. IntegrityCheckJob also gained cancellation checks between each step and within iteration loops.
2026-07-08 01:07:25 +02:00
REDCODE 7554dbac9c fix: cancel past refresh loop when poll rate is set to Off 2026-07-08 01:06:38 +02:00
REDCODE defd97e7f0 feat: add stacked progress bar for parent jobs with sub-job breakdown
Parent jobs with fetched sub-jobs now show a multi-color stacked
progress bar instead of the single parent-progress bar. Segments
represent sub-job status distribution: completed (success),
running (primary), waiting (info), failed (danger), with-errors
(warning), and queued (primary for visibility in dark theme).

ProgressBar gets an optional Segments parameter for stacked mode.
JobRow accepts Children and computes status-weighted segments.
JobTree passes cached children to JobRow.
2026-07-08 00:20:46 +02:00
REDCODE 6c9a608ce6 fix: propagate cancellation to sub-jobs in batch processing jobs
MetadataJob, ThumbnailJob, PreviewJob, and PHashJob previously only
canceled the master job's own token, leaving already-enqueued sub-jobs
running indefinitely. Added child-job tracking with proper cancellation
propagation at both master cancellation exit points, matching the
existing pattern in FileSystemCrawlJob.
2026-07-08 00:20:40 +02:00
REDCODE c7d555d90b fix(ui): apply poll interval to child jobs, add @key for DOM reuse, guard admin pages
- Pass PollInterval from Jobs page to JobTree so children refresh at the
  same rate as parent jobs (instead of hardcoded 1s)
- Add @key on JobRow (by job Id) and group divs so Blazor reuses DOM
  nodes across polls instead of tearing down and rebuilding
- Redirect non-admin users to / on Jobs and Settings pages
- Fix date formatting in User page
2026-07-07 01:05:31 +02:00
REDCODE 0d12b45563 feat(jobs): apply batching to PHashJob and MetadataJob
Same batch processing pattern as ThumbnailJob:
- Paginated DB queries (200 per batch) via Count + Skip/Take methods
- Atomic counters with Interlocked.Increment
- Thread.Sleep(100) polling instead of busy-wait
- Added failedAssets tracking to MetadataJob (was missing)
2026-07-07 00:19:08 +02:00
REDCODE b20b7d20fd fix(jobs): prevent silent crash on large thumbnail jobs and auto-refresh child jobs
Backend (Lactose):
- Dispose DI scopes in JobManager.CreateJob to fix memory leak
- Check t.IsFaulted in Job.ContinueWith so unhandled exceptions surface as
  failed jobs instead of being silently treated as completed
- Batch asset processing in ThumbnailJob (200 per batch) with paginated DB
  queries instead of loading all 1.3M+ assets into memory at once
- Replace busy-wait with Thread.Sleep(100) to avoid CPU spinning

Frontend (MilkStream.Client):
- Auto-refresh child jobs every 1s in JobTree when a parent is expanded
  and still active (Queued/Running/Waiting), stopping on collapse or
  terminal status
2026-07-06 23:58:07 +02:00
Samuele LoreficeandGitHub 0b47a8d2b2 Merge pull request #7 from SamueleLorefice/copilot/fix-hanging-jobs-and-folderid-issue 2026-07-06 15:03:18 +02:00
Samuele LoreficeandGitHub 3b274ff38c Merge pull request #5 from SamueleLorefice/copilot/analyze-cors-risk
feat(cors): support semicolon-separated CorsAllowedOrigins env var
2026-04-25 19:15:30 +02:00
REDCODE 01e2d236a1 Small cleanup 2026-04-25 19:13:39 +02:00
c3a352eb9c Update Lactose/Program.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-23 04:55:59 +02:00
REDCODE 230d0a7d1b Merge remote-tracking branch 'GitHub/develop' into feature/JobsEndpoint 2026-04-23 04:07:04 +02:00
Samuele LoreficeandGitHub 2cff9525bb Merge pull request #4 from SamueleLorefice/copilot/update-agents-md-wasm-architecture
doc: update agents.md for Blazor WebAssembly architecture
2026-04-23 04:06:44 +02:00
Samuele LoreficeandGitHub 3ff8b3de8f Merge pull request #3 from SamueleLorefice/copilot/update-branch-to-be-compatible
Merge WASM frontend migration (PR #2) into feature branch
2026-04-23 04:06:07 +02:00
Samuele LoreficeandGitHub e0cddb8aaa Merge pull request #2 from SamueleLorefice/copilot/convert-frontend-to-wasm
Convert from SSR to WASM client
2026-04-23 03:37:49 +02:00
REDCODE e2f08607e2 made so settings save buttons to only show if any setting is available 2026-04-22 23:02:12 +02:00
REDCODE 374bd48adb Added * as CORS origins for the WASM client to be able to connect 2026-04-22 22:58:19 +02:00
Samuele LoreficeandGitHub 9ee59e50c9 Merge pull request #1 from SamueleLorefice/copilot/create-agents-md
Created Agents.md
2026-04-22 21:15:46 +02:00
Samuele Lorefice 84c1548221 Settings WIP 2025-09-09 22:01:55 +02:00
Samuele Lorefice b183521af8 General Cleanup (and async/awaiting rules enforcing) 2025-09-09 19:32:19 +02:00
Samuele Lorefice 16f53cb931 Added User Page 2025-09-09 18:49:20 +02:00
Samuele Lorefice b052a025a7 Small Refactor 2025-09-09 17:30:33 +02:00
Samuele Lorefice f31369bea9 Added missing settings and power slider. Broken state 2025-09-05 04:56:53 +02:00
REDCODE b2cfdc5af4 Fixed Race condition on Thumbnail job signaling.
Moved compose to use proper docker configs instead of normal development configs.
2025-09-05 00:48:18 +02:00
Samuele Lorefice 3dacf84a85 Some more failsafes 2025-09-04 20:40:22 +02:00
Samuele Lorefice bd18d8f636 Tasks now fail when they fail. 2025-09-04 20:34:03 +02:00
Samuele Lorefice 19b57901f1 I am slowly losing sanity 2025-09-04 20:20:48 +02:00
Samuele Lorefice 3bee6c7939 Strictly enforces calling the correct methods to change the job status, ensuring events are fired correctly 2025-09-04 20:10:05 +02:00
Samuele Lorefice dde98a9740 Refactoring for readability in thumb job 2025-09-04 19:53:21 +02:00
Samuele Lorefice 2b84d66e8b WIP debug for Thumbnailjob 2025-09-04 19:50:52 +02:00
Samuele Lorefice 7c2029c7e4 Wasn't done with the time yet. 2025-09-04 19:25:23 +02:00
Samuele Lorefice ccbc75a31c fix(frontend): Fixes all of the special HttpClients to not have been specialized due to a small typo in the program init.
fix(frontend): Fixes time being interpreted as local time instead of UTC time for job cards.
feat(frontend): Adds more job types buttons on the job page
2025-09-04 19:13:59 +02:00
Samuele Lorefice a170025520 Moved to a compatible pgvector db variant, implemented Thumbnails job 2025-09-04 04:59:15 +02:00
Samuele Lorefice 627239f0a3 Enabled vector extensions 2025-09-04 02:40:29 +02:00
REDCODE 28e53eb31b PHash Job implementation 2025-09-03 23:37:56 +02:00
Samuele Lorefice e070031ec0 Added libraries for image processing and hashing 2025-09-03 20:56:29 +02:00
Samuele Lorefice a4747ca417 Front end work on Jobs page 2025-09-03 20:55:57 +02:00
REDCODE 74f3584dd0 FrontEnd work (partial) 2025-09-03 03:45:03 +02:00
REDCODE 1e3a0eae53 Added IntegrityCheck job 2025-09-03 01:02:20 +02:00
REDCODE 9d6da2af06 Leveled logging settings 2025-09-02 22:35:27 +02:00
Samuele Lorefice 4beddeaa2e Added scheduler as singleton to allow JobsController to use it 2025-09-02 21:09:56 +02:00
Samuele Lorefice b18f294db4 Scaffolded Jobs controller basics 2025-09-02 20:40:16 +02:00
Samuele Lorefice 6719cb6546 Merge branch 'feature/JobSystem' into develop 2025-09-02 19:34:48 +02:00
Samuele Lorefice 8778cef71d Merge branch 'feature/JobSystem' into develop 2025-09-02 19:34:48 +02:00
Samuele Lorefice 21d865e654 Fixed crashes on UpdateProgress, reorganized logic for scanner service, fixed scheduler not being able to get hold of the JobManager, JobManager now uses ConcurrentDictionary for thread safe access. 2025-09-02 19:19:44 +02:00
Samuele Lorefice 8e5ba0ec31 Fixed crashes on UpdateProgress, reorganized logic for scanner service, fixed scheduler not being able to get hold of the JobManager, JobManager now uses ConcurrentDictionary for thread safe access. 2025-09-02 19:19:44 +02:00
Samuele Lorefice d5148c1722 feat(backend): Added JobScheduler
feat(backend): Added logging to JobManager
feat(API): FolderRepository now exposes FolderAdded / FolderRemoved static events.
2025-09-02 17:35:20 +02:00
Samuele Lorefice 67a7eec155 feat(backend): Added JobScheduler
feat(backend): Added logging to JobManager
feat(API): FolderRepository now exposes FolderAdded / FolderRemoved static events.
2025-09-02 17:35:20 +02:00
Samuele Lorefice 5689098e00 Refined Job system, added FileSystemCrawl job full implementation. 2025-09-01 18:20:39 +02:00
Samuele Lorefice 49b53b0886 Refined Job system, added FileSystemCrawl job full implementation. 2025-09-01 18:20:39 +02:00
Samuele Lorefice ed3ca19d66 Initial job implementation 2025-09-01 15:13:45 +02:00
Samuele Lorefice c6295546ad Initial job implementation 2025-09-01 15:13:45 +02:00
Samuele Lorefice ff8ae77ebe Merge branch 'feature/frontend' into develop 2025-09-01 11:19:18 +02:00
Samuele Lorefice 01a9fd654d Merge branch 'feature/frontend' into develop 2025-09-01 11:19:18 +02:00
Samuele Lorefice 516c4dba61 misc. 2025-08-31 23:46:31 +02:00
Samuele Lorefice e296b142a3 misc. 2025-08-31 23:46:31 +02:00
Samuele Lorefice a4457a824a fix(API): solved filesystem scanner not scanning 2025-08-31 23:43:03 +02:00
Samuele Lorefice 4cab2988e1 fix(API): solved filesystem scanner not scanning 2025-08-31 23:43:03 +02:00
Samuele Lorefice 3bd30dfde9 filesystem scanner troubleshooting 2025-08-31 22:16:17 +02:00
Samuele Lorefice 0a57919271 filesystem scanner troubleshooting 2025-08-31 22:16:17 +02:00
Samuele Lorefice 8d4186c137 feat(frontend): added folder removal in settings 2025-08-31 20:19:28 +02:00
Samuele Lorefice 1fd6ebc570 feat(frontend): added folder removal in settings 2025-08-31 20:19:28 +02:00
Samuele Lorefice 2aeaf9b5fe Attempts to speedup user login retrieval from localstorage 2025-08-31 20:08:16 +02:00
Samuele Lorefice 5827f88956 Attempts to speedup user login retrieval from localstorage 2025-08-31 20:08:16 +02:00
Samuele Lorefice bd00119fe9 feat(frontend): editing of settings and addition/editing of folder paths 2025-08-31 19:35:15 +02:00
Samuele Lorefice ca290bcba7 feat(frontend): editing of settings and addition/editing of folder paths 2025-08-31 19:35:15 +02:00