98 Commits
Author SHA1 Message Date
najdek 0bf2b5e78b reduce log spam from frontend polling
- Muted logs for automatically polled endpoints (`/list_payloads`, etc.)
- Added explicit log line for process kill requests to keep track of terminated PIDs
v0.3.0
2026-06-04 02:46:47 +02:00
najdek 293f44b4ef feat(StorageHub): unify repository UI, add alphabetical sorting and payload update dates
- Refactored `StorageHub.jsx` to share a unified `enrichedSources` data flow between single-source and multi-source modes, eliminating duplicated rendering logic
- Payloads are now sorted alphabetically by name across all repository views (with available updates automatically pinned to the top)
- Updated `PayloadName` component to accept a `lastUpdate` prop, natively rendering the payload version and update date side-by-side
- Conditionally hide accordion headers and restore discrete grid-card styling for legacy single-source mode, preserving the original look while utilizing the normalized codebase
- Fixed a backend bug in `src/sources.c` where the `last_update` field was incorrectly omitted from the serialized JSON array during multi-source repository fetches
2026-06-04 02:37:40 +02:00
najdek b8abb0a6ba frontend: correctly handle empty repository states in StorageHub 2026-06-04 01:35:41 +02:00
najdek dcc3cf2fd8 frontend: add persistent payload warning to ActiveProcessesView 2026-06-04 01:30:07 +02:00
najdek 7a001e4579 reduce sleep duration during disc player suspension process 2026-06-03 21:57:11 +02:00
najdek 2a12e84283 fix: restore overwrite confirmation prompt for payload uploads
During the recent storage refactoring, `payload_mgr_check_existing` was updated to return a simplified `{"exists": true}` structure. However, the frontend (`App.jsx`) still relied on the `file_exists` and `folder_exists` boolean flags to display the overwrite confirmation modal when a duplicate payload is uploaded. Because those fields were missing, the frontend silently fell through and overwrote the files without asking.

This change restores the original JSON output format for the `/manage:check` endpoint (`file_exists`, `folder_exists`, and `folder_name`), ensuring the overwrite prompt appears again when an uploaded ELF already exists.
2026-06-03 19:37:56 +02:00
najdek a292541f32 bump version to v0.3.0 2026-06-03 18:41:43 +02:00
najdek 55ec5c1d00 fix: correct payload list JSON structure and remove duplicate scanning
- Revert `payload_mgr_list_json` to output an array of string paths
  for `"payloads"` rather than an array of objects, as expected by
  the React frontend.
- Move payload metadata extraction back to a separate `"meta"` object
  indexed by filename.
- Remove the redundant explicit recursive scan of `PAYLOADS_STORAGE_DIR`.
  Because the directory is `/data/pldmgr/payloads`, it is already
  covered by the recursive scan of `SCAN_DIRS[0]` (`/data/pldmgr`),
  which was causing all internal payloads to appear twice in the list.
2026-06-03 18:33:08 +02:00
najdek 2189ee962d refactor: decompose main.c and payload_mgr.c into focused modules
Split two monolithic files (main.c 1538→233 lines, payload_mgr.c
2355→467 lines) into 8 single-responsibility modules:

- http_server.c: MHD request router and all route handlers
- repository.c: repo cache, download, install/commit, self-update
- sources.c: multi-source repository management
- config.c: PldmgrConfig struct, read/write, JSON config handler
- log_server.c: ring buffer, SSE streaming, pldmgr_log()
- json_helpers.c: JsonListBuilder, JSON parser, file I/O utilities
- sha256.c: SHA256 hash implementation
- process_mgr.c: process listing and kill

Introduces PldmgrConfig struct to replace the 8-out-param
read_next_config_values() pattern. Renames extracted functions to
match their new modules (e.g. repository_install_download,
sources_add, process_kill). No HTTP route changes — frontend
is unaffected.
2026-06-03 18:22:26 +02:00
najdek 631e7de0c6 feat: add active processes management tab
Introduces a new "Active Processes" feature that enables users to view and
manage background processes running on the PS5.

Backend:
- Add `payload_mgr_process_list_json` using `sysctl` with `KERN_PROC_PROC`
  to fetch the kernel process list and memory footprints.
- Retrieve `appinfo` via `sceKernelGetAppInfo` to filter for user-spawned
  daemons (requires appid == `0000`).
- Implement `payload_mgr_process_kill` utilizing `SIGKILL`.
- Expose `/processes_list` and `/process_kill` endpoints.

Frontend:
- Add `ActiveProcessesView.jsx` with a real-time table of running processes.
- Implement background auto-refresh every 15s to maintain the UI state.
- Add safety nets to completely disable killing critical processes
  (`pldmgr.elf` and `elfldr.elf`).
- Implement kill confirmation modal to avoid accidental terminations.
- Integrate "Active Processes" tab with the sidebar and mobile bottom navigation.
2026-06-03 17:58:04 +02:00
najdek 0e0a434651 docs: add custom repositories guide and update README 2026-06-03 00:43:02 +02:00
najdek 77c833a89d fix(frontend): improve alignment and hover behavior on StorageHub 2026-06-03 00:18:13 +02:00
najdek 93b1281c59 remove legacy repository fallback logic for payload badges and update comments 2026-06-03 00:11:17 +02:00
najdek 3b1bfe6feb fix(frontend): adjust sources layout breakpoint 2026-06-02 22:15:42 +02:00
najdek af72c9b611 frontend: layout and responsiveness fixes for storage management card and viewports
- Adjusted Installed/USB Payloads grids from md:grid-cols-2 to lg:grid-cols-2 to prevent card overlapping on narrow windows.
- Reshaped cards to always use row layout on mobile to eliminate wasted empty vertical space.
- Moved Update button to its own full-width row at the bottom of the card with reduced vertical padding to prevent action clashing.
- Added remote version target display to the Update button.
- Cleaned up width constraints in PayloadName to enable text truncation on narrow screens.
2026-06-02 21:59:35 +02:00
najdek b3fe1b586a frontend: Fix mobile layout and styling in Settings and Manage Sources views 2026-06-02 21:59:35 +02:00
najdek f4c76fbfb4 feat: add multi-source payload repository support
- Add MULTI_SOURCES_ENABLED config flag with toggle in Settings
- New "Manage Sources" view: add/remove/reorder third-party payload sources
  via URL; default source is locked and non-removable
- Source JSON format: top-level `name` field sets display name; falls back
  to hostname extraction if absent; checksums are optional
- PS5 mode shows QR code + URL for Manage Sources; desktop shows full list UI
- Source removal uses shared confirm modal; reorder auto-saves with toast
- Backend (payload_mgr.c):
  - CRUD for sources list persisted to /data/pldmgr/sources.json
  - Multi-source repository list/install routes; each source has its
    own independent payload catalog
  - Bounded name parsing: only searches before "payloads" key to avoid
    capturing payload item names; domain fallback when name absent
  - list_payloads response now includes `meta` map: walks
    PAYLOADS_STORAGE_DIR subdirectories for .elf/.bin/.lua sidecar
    files and emits source_name per payload
  - Fallback for pre-feature sidecars: extracts hostname from
    install_source_detail, skipping the official repository URL
- Frontend: source badge (Globe icon + name) shown in bottom-right corner
  of each payload card on Dashboard and Management tab when
  MULTI_SOURCES_ENABLED is on and payload has a non-default source
- StorageHub: accordion-style per-source catalogs when multi-source enabled
- showConfirm helper in App.jsx auto-closes modal before executing callback
2026-06-02 21:59:35 +02:00
Mateusz Najdek 72e781867a Update credits section in README.md 2026-06-02 13:43:45 +02:00
Mateusz Najdek 09a95ccd82 Update CHANGELOG for version 0.2.0 release 2026-06-02 08:51:55 +02:00
najdek 10b786b555 ci: add on-demand release workflow v0.2.0 2026-06-02 00:48:55 +02:00
najdek 9e5ea12bf1 bump version to v0.2.0 2026-06-02 00:36:47 +02:00
najdek 0380757957 backend: remove payload scanning logs 2026-06-02 00:36:10 +02:00
najdek 6d14acf665 frontend: scroll to USB Storage section when navigating from Autoload 2026-06-02 00:33:29 +02:00
najdek 75b20ceff4 frontend: scroll to top of main content container on view change 2026-06-02 00:30:08 +02:00
najdek 7dee294ad0 frontend: update download modal title 2026-06-02 00:25:11 +02:00
najdek 2e7de34648 frontend: update SettingsView layout to responsive grid and improve UI consistency 2026-06-01 23:36:03 +02:00
najdek 10c4233eea frontend: fix DonateView layout 2026-06-01 23:14:29 +02:00
najdek 75700847e8 frontend: persist sidebar expanded state
The sidebar's expanded/collapsed state is now saved in `localStorage`. This ensures that if the user collapses the sidebar, it stays collapsed after reloading the page or returning to the app later.
Implemented via a `useState` lazy initializer and `useEffect` hook in `App.jsx`.
2026-06-01 23:06:42 +02:00
najdek 5ff5295120 fix: clean up empty directory after payload deletion
fixes issue #24
2026-06-01 22:57:44 +02:00
najdek bfc4d096c5 Fix loading payloads from USB root
- Allow /mnt/usb paths in is_allowed_payload_path
- Expose pldmgr_read_config_bool globally

Closes #18
2026-05-28 13:03:29 +02:00
najdek 1ebcf988d4 Update deploy.sh to remove deprecated curl shutdown step 2026-05-28 00:14:00 +02:00
najdek 6772ae3a4e Merge branches 'pr-12', 'pr-13', 'pr-15' and 'pr-17' 2026-05-28 00:13:55 +02:00
owendswang a34ecffa22 Replace existing daemon instance on startup 2026-05-28 02:49:09 +08:00
owendswang 38b112496e Report payload launch failures 2026-05-28 02:48:01 +08:00
owendswang 54c2728bf4 Make frontend-build sed usage portable 2026-05-28 02:21:28 +08:00
owendswang 73d31753d6 Limit USB root payload scan to root directory 2026-05-28 01:38:04 +08:00
najdek eb23f205fa bump version to v0.1.2 2026-05-27 00:31:28 +02:00
najdek c8c380b4f1 feat: add favicon and app icons
- Update favicon to match the LogoIcon.
- Serve icons from the native C web server.
- Ignore generated asset headers in .gitignore.
2026-05-27 00:12:22 +02:00
najdek cfba6b8237 build: use dedicated docker image ps5-payload-sdk-pldmgr to prevent image tag conflicts 2026-05-24 01:54:49 +02:00
Mateusz Najdek cad957fa21 Update GitHub funding username to itsPLK 2026-05-11 18:16:30 +02:00
najdek 1baa48e4f3 release: v0.1.1 - stability and ui refinements v0.1.1 2026-05-02 14:02:27 +02:00
najdek 193807f70c fix: autoload sync, log viewer overlay, and layout refinements 2026-05-02 13:53:40 +02:00
najdek 90cd196f5b fix: resolve autoload synchronization, rendering, and layout issues 2026-05-02 13:40:08 +02:00
najdek 1535c7baed fix(frontend): improve compatibility for older firmware (PS5 4.03, iOS 12)
- Downgrade to Tailwind 3 for better legacy support
- Target Safari 12 in build pipeline
- Add CSS fallbacks for critical layout classes
- Flatten CSS layers via Tailwind 3 output
2026-05-02 12:16:29 +02:00
najdek 303c307576 docs: update README, add DEVELOPMENT and CHANGELOG 2026-05-01 21:59:19 +02:00
najdek 1afc9d3358 improve frontend update reliability and management
- Server: Fixed caching headers (no-cache) for index.html and cache.appcache to force browser revalidation.
- Build: Added seconds to the build timestamp in the Makefile to ensure every build generates a unique manifest.
- Build: Created build_release.sh to automate versioned ELF generation (pldmgr_vX.Y.Z.elf).
- UI: Refined system payload detection to support versioned filenames.
- UI: Allowed system/update payloads to be visible and deletable in the "Manage Payloads" tab, while keeping them hidden from the main dashboard.
2026-05-01 00:23:27 +02:00
najdek 3efc4f4565 Fix frontend caching & self-update logic 2026-04-30 23:42:40 +02:00
najdek 9180759fa2 bump version to v0.1.0 2026-04-30 21:35:40 +02:00
najdek cbef97a196 perf: frontend performance optimizations for console browser 2026-04-30 21:35:09 +02:00
najdek 1196e67569 ui: add hint for USB scanning in Storage Hub when disabled 2026-04-30 21:10:33 +02:00