Commit Graph

1043 Commits

Author SHA1 Message Date
Ajit Mehrotra
ad2a5cc443 test(notifications): Update various api and web component tests 2025-12-30 16:01:26 -05:00
Ajit Mehrotra
8ef00ce27f chore: lint 2025-12-29 13:32:39 -05:00
Ajit Mehrotra
716789fa00 fix: add generated files + patch + snapshot files 2025-12-29 13:19:55 -05:00
Ajit Mehrotra
902307ae55 feat(notifications): add file-modification scripts for nuxtui notifications. Supports 7.0-7.2.3 2025-12-23 21:08:22 -05:00
Ajit Mehrotra
2f88228937 fix(theme): adjust logo overlap on azure/gray themes on unraid versions < 7.1 2025-12-23 21:08:05 -05:00
Ajit Mehrotra
5628bf9a0e fix(color): fix bell icon color in header to work on all themes
Azure theme causing problems because it's the only theme where the color of the icon can't be inverted (bruh)
2025-12-23 21:08:05 -05:00
Ajit Mehrotra
a8578bf79b refactor(notifications): move ToastPosition type to a separate file and clean up imports
- Created a new file for ToastPosition type definitions to improve code organization.
- Removed the inline ToastPosition type definition from mount-engine.ts and updated the import accordingly.
- Added a comment in app.config.ts for clarity on toaster settings.
2025-12-23 21:06:44 -05:00
Ajit Mehrotra
88e76d7fa2 feat(notifications): update nuxtui to 4.2.1 and add new toast features
- Added optional properties `expand`, `duration`, and `max` to the Notify interface.
- Updated NotificationSettings class to include validation for new properties.
- Modified the NotificationsService to parse and return the new settings.
- Adjusted the toaster configuration in the app to utilize the new settings.
- Updated GraphQL query to fetch the new notification settings.
2025-12-23 21:06:39 -05:00
Ajit Mehrotra
1e5deccb70 Revert "Revert "fix(notifications): add support for bottom-center'd nuxtui toasts""
This reverts commit 2707f693e0.
2025-12-23 21:05:59 -05:00
Ajit Mehrotra
4c49bafe15 chore(dependencies): update @nuxt/ui to version 4.2.1 from 4.0.0 alpha 2025-12-23 21:05:59 -05:00
Ajit Mehrotra
17f0176857 fix(notifications): set 'top-right' as default toast location 2025-12-23 21:05:59 -05:00
Ajit Mehrotra
4abc79a7b5 fix(notifications): sync badges on api recovery
Updates the notification sidebar to properly refresh notification counts (badges) when the API connection is restored or when the user manually retries.

Changes:
- Emit `refetched` event from `NotificationsList` when the query successfully returns data.
- Trigger `recalculateOverview` and `refetch` in `Sidebar` when the list is refreshed or when the API status becomes 'online'.
- Fixes an issue where notification badges would remain at 0 after an API outage, even though the notification list had populated correctly.
2025-12-23 21:05:59 -05:00
Ajit Mehrotra
e817d6a317 fix(notifications): add onResult handler to update online status based on notification data 2025-12-23 21:05:59 -05:00
Ajit Mehrotra
c2d2fbea40 feat(notifications): introduce constants for notification icons and colors to streamline notification rendering across components 2025-12-23 21:05:59 -05:00
Ajit Mehrotra
ad78a0251a feat(errors): add dbgApolloError function for enhanced GraphQL error logging and improve extractGraphQLErrorMessage to handle additional error structures 2025-12-23 21:05:59 -05:00
Ajit Mehrotra
c18de73b29 refactor(notifications): center notification error button text 2025-12-23 21:05:59 -05:00
Ajit Mehrotra
e61657c05b refactor(notification): use "size" for square css widths and height 2025-12-23 21:05:54 -05:00
Ajit Mehrotra
7969e44211 refactor(navigation): replace window.location with navigate helper for external URL handling across multiple components 2025-12-23 21:04:39 -05:00
Ajit Mehrotra
fd1a04641a feat(notifications): integrate nuxtui toast composable for success messages in RCloneConfig component 2025-12-23 21:01:03 -05:00
Ajit Mehrotra
d10e0540eb feat(notifications): replace docker toast usage with nuxtui toast composable in ConnectSettings, DockerContainersTable, and RCloneOverview components 2025-12-23 21:00:57 -05:00
Ajit Mehrotra
6458457a7f feat(components): add DockerContainerStatCell and USlideover components to type declarations 2025-12-23 20:59:09 -05:00
Ajit Mehrotra
53ee465e92 fix: resolve no-undef lint errors for auto-imported composables in Vue files
Problem:
ESLint was flagging auto-imported composables (like `useToast`) as undefined variables in `.vue` files. While TypeScript correctly identified these globals via `auto-imports.d.ts`, the default `no-undef` rule in our Vue ESLint config did not account for them, causing false positive linting errors.

Solution:
- Disable the `no-undef` rule specifically for `.vue` files in `eslint.config.mjs`.
- Rely on TypeScript (via `vue-tsc`) and `auto-imports.d.ts` to handle global variable validation, ensuring type safety without conflicting with the auto-import build process.
- Remove manual imports of `useToast` that were added as a workaround (p sure the path I used didn't even exist in node modules).
2025-12-23 20:58:49 -05:00
Ajit Mehrotra
4a19d4d536 fix(notifications): enable user overrides for the header text color 2025-12-23 20:58:49 -05:00
Ajit Mehrotra
ddd6b0b54f Revert "fix(notifications): add support for bottom-center'd nuxtui toasts"
This reverts commit b147762e8a.
2025-12-23 20:58:49 -05:00
Ajit Mehrotra
e3bf57184b fix(notifications): resolve ID mismatches, counter bugs, and pagination drift
This commit addresses several critical stability issues in the notification system spanning the legacy PHP script, the Node.js API, and the Vue frontend.

**Backend / API:**
- **Refactor `notify` script (PHP):** Added `-u` flag to accept a custom filename/ID from the caller. Added filename length sanitization (255 chars) to prevent filesystem errors.
- **Fix ID Mismatch:** The Node API now generates a UUID and passes it to the `notify` script via `-u`. This guarantees that the API, Frontend, and Filesystem all reference the same ID, removing the need for "Risky" notification logic.
- **Fix Counter Bugs:**
    - `handleNotificationAdd` no longer ignores duplicate files in the archive.
    - `archiveNotification` now checks if a file exists in the archive before moving. If it exists, it simply deletes the unread copy without double-counting.
    - `archiveAll` now leverages the robust single-archive logic.

**Frontend (Web):**
- **Fix Infinite Scroll "Drift":**
    - Switched `List.vue` to use a **Debounced Refetch** (500ms) for subscription updates instead of manual cache manipulation. This handles rapid-fire events (mass adds) without corruption.
    - Increased `pageSize` to `50` to minimize race conditions where new items shift pagination offsets.
    - Added **Drift Detection**: If `fetchMore` returns a full page of duplicates (indicating the list has shifted), the component now automatically triggers a full refetch to self-heal.
2025-12-23 20:58:49 -05:00
Ajit Mehrotra
6a04a06a72 fix(notification): add min width to allow flex title to shrink and wrap text 2025-12-23 20:58:49 -05:00
Ajit Mehrotra
875aa0972a fix(notifications): fix color of notification button's active state 2025-12-23 20:58:49 -05:00
Ajit Mehrotra
f690c23a20 fix(notifications): add support for bottom-center'd nuxtui toasts 2025-12-23 20:58:49 -05:00
Ajit Mehrotra
fe74e53cf5 fix(notifications): show full title on notification pane and truncate toasts 2025-12-23 20:58:49 -05:00
Ajit Mehrotra
be1e2f5ee2 fix(notifications): add elipses to long single-word toast titles 2025-12-23 20:58:49 -05:00
Ajit Mehrotra
67ac30787f fix(notifications): add break-word styling for long words in subject and description 2025-12-23 20:58:49 -05:00
Ajit Mehrotra
c21ecc7cb7 fix(notifications): override notification bell hover to maintain consistency with legacy webGUI 2025-12-23 20:58:49 -05:00
Ajit Mehrotra
1000976296 fix(app.config): update toast max duration comment for compatibility with Nuxt UI 4.0.0-alpha.0 2025-12-23 20:58:49 -05:00
Ajit Mehrotra
9f27eb787f refactor(notifications): sync toast position with legacy settings
This change ensures that Nuxt UI notifications respect the display position configured in the legacy webGUI settings.

Backend:
- Added `NotificationSettings` to the GraphQL model.
- Exposed `settings` field on the `Notifications` resolver.
- Implemented `getSettings` in `NotificationsService` to read `notify.position` from the Dynamix store.

Frontend:
- Added `getNotificationSettings` GraphQL query.
- Updated `mount-engine.ts` to fetch settings before mounting.
- Mapped legacy position values (e.g., 'center') to Nuxt UI compatible values (e.g., 'top-center').
2025-12-23 20:58:44 -05:00
Ajit Mehrotra
88766adeea refactor(ui): replace vue-sonner toasts with nuxtui toasts
> [!Note] This stubs the unraid-ui/src/components/common/toast. Initially created a shim to convert vue-sonnner toasts to nuxtui. However, since there weren't that many, I just did a clean replacement.

- replace router link with window.location.assign

The `UButton` component attempts to inject the Vue Router instance when the `:to` prop is used. In the standalone component environment (where the router is not installed), this caused a "TypeError: inject(...) is undefined" crash when rendering notifications with links.

This change replaces the `:to` prop with a standard `@click` handler that uses `window.location.assign`, ensuring navigation works correctly without requiring the router context.
2025-12-23 20:56:30 -05:00
Ajit Mehrotra
e80ea795fe refactor: enhance app configuration and notification components for improved UI consistency
- modified vite.config.ts to integrate app configuration into UI setup
- updated app.config.ts to include new button, tabs, and slideover variants for better theming
- cleaned up main.css by removing unused styles and ensuring proper imports
- refactored notification components to streamline structure and improve readability
2025-12-23 20:56:00 -05:00
Ajit Mehrotra
7679d71c3e refactor: update notification components to use UIcon and UButton for improved consistency
- replaced Heroicons components with UIcon for better integration
- refactored Sidebar.vue to utilize USlideover and UButton for a cleaner UI
- removed unused imports and styles in main.css for better maintainability

NOTES:
- had to change main.css variables for it to work properly. Need to make sure this doesn't ruin other people's code.
- still needs to be further refactored to align with existing ui variables
2025-12-23 20:55:55 -05:00
Ajit Mehrotra
a8459c7431 fix: address notification pane infinite network request and improve error messages
commit addresses the following two bugs/issues:
1. infinite network requests
2. make error messages more accurate

bug details:
- when scrolled all the way down in the notification pane (when api is down), unraid infinitely sends network requests.
- must be scrolled all the way to the bottom and stay at the bottom of the pane while the api is down

technical details:
- for infinite loop, added try/catch that sets a canLoadMore flag to false when it encounters an error, preventing infinite loop
- errors now look at non-standard locations as well

impact:
- performance benefits
- more graceful ux on failure
2025-12-23 20:55:02 -05:00
Ajit Mehrotra
29312d78e6 refactor: replace LoadingSpinner and LoadingError with nuxtUI components
- update VSCode settings for Tailwind CSS support
2025-12-23 20:55:02 -05:00
Ajit Mehrotra
a32dd2182a enhance: add ssh retry logic and SSH options in deploy script 2025-12-23 20:55:02 -05:00
Pujit Mehrotra
d07aa42063 table > select & status badge
fix context menu trigger area and dropdown styles

implement 'move to folder'

implement 'start / stop' bulk & row actions

implement pause / resume

implement column visibility customization

fix(organizer): over-eager addition of untracked containers to root folder

scaffold docker form service

docker container management prototype

use compacted table as sidebar tree

add drag and drop for re-ordering containers & folders

right click to reame & delete folders

add bottom padding to container to make it easier to drag items to bottom in sidebar

click overview row to open details

track active container in query param

refactor: extract composables

refactor: simplify organizer operations

refactor!: rm intermediate tree resolution of organizers

BREAKING CHANGE: ResolvedOrganizerView -> root is replaced by rootId +
flatEntries.

`root` resolved a tree representation of an organizer, but this required
clients to defined and use their own tree operations, thus increasing
client complexity.

Instead, `flatEntries` is more suitable for client operations and only
requires an initial mapping step on the client for efficiency.

fix: rm extra Root layer in table

map containers to their template files

feat: icon support

fix: container state badge

chore: fix formatting

fix: search filtering

fix: context menu

feat: filtering & bulk actions in compact mode

feat: critical notifications

feat: notifyIfUnique service method

tmp: critical notifications system

fix: nuxt ui portal styling

fix: notifications type check

fix api tests

fix: css

Revert "fix: css"

This reverts commit 234c2e2c65.

add docker constants

flatten css scopes

feat: file modification for replacing docker overview table

feat: navigate to container update page

feat: implement manage settings action

fix: column visibility toggle

fix: move update to a badge + popover

feat: save column visibility preferences across visits

fix: add feature flag to containers file mod

fix: circular dependency in docker service

add a flag to opt out of version check in super.shouldApply in file mods

fix: optimistic column toggle update

refactor: optimistic column toggle

feat: container start & stop order

feat: bulk toggle auto-start

fix: add background style reset, apply to button:hover as well

feat: add ENABLE_NEXT_DOCKER_RELEASE=true to staging environment

chore(api): add dev/notifications to gitignore

feat: container update actions

fix: container update logic

feat: bulk container updates

feat: container sizes

fix: container sizes modla overlay

fix: checkbox alignment

fix: revert color in main css

chore: ignore build output in lint & fix

feat: server-side container ip

add docker feature flag to .env.production

fix: container port duplication

feat: multi-value copyable badges

feat: make lanIpPorts a list, not a csv

feat: visit button

feat: include indexed search fields in filter input title

feat: sync userprefs.cfg for rollback compat

feat: port conflicts

refactor: port conflict frontend stuff

feat: update all containers bulk action

feat: docker logs

fix: use container name instead of id in 'view logs' modal

make webgui iframable

feat: re-add compact mode

manage settings > compact view

fix styles

feat: container stats

refactor: docker autostart service

refactor: docker log, event, and port services
2025-12-23 20:54:54 -05:00
Eli Bosley
9ef1cf1eca feat: docker overview (#1855)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes v4.29.2

* **New Features**
* Added iframe mode support with UI adjustments for embedded deployments
  * Introduced modal portal system with dark mode integration

* **Bug Fixes**
* Fixed log line deduplication sync issue in Docker log viewer to
prevent orphaned entries

* **Improvements**
  * Enhanced table header rendering for consistent behavior and resizing
  * Improved notification subscription handling for better stability
  * Optimized log viewer initialization behavior
  * Simplified organizer API parameter handling

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Pujit Mehrotra <pujit@lime-technology.com>
2025-12-22 13:18:16 -05:00
Eli Bosley
a0745e15ca Revert "fix: revert replace docker overview table with web component (7.3+) (#1853)"
This reverts commit 560db880cc.
2025-12-19 15:28:19 -05:00
github-actions[bot]
c39b0b267c chore(main): release 4.29.2 (#1857)
🤖 I have created a release *beep* *boop*
---


## [4.29.2](https://github.com/unraid/api/compare/v4.29.1...v4.29.2)
(2025-12-19)


### Bug Fixes

* unraid-connect plugin not loaded when connect is installed
([#1856](https://github.com/unraid/api/issues/1856))
([73135b8](73135b8328))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-19 15:13:29 -05:00
github-actions[bot]
e42d619b6d chore(main): release 4.29.1 (#1854)
🤖 I have created a release *beep* *boop*
---


## [4.29.1](https://github.com/unraid/api/compare/v4.29.0...v4.29.1)
(2025-12-19)


### Bug Fixes

* revert replace docker overview table with web component (7.3+)
([#1853](https://github.com/unraid/api/issues/1853))
([560db88](560db880cc))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-19 12:19:44 -05:00
Eli Bosley
560db880cc fix: revert replace docker overview table with web component (7.3+) (#1853)
Reverts unraid/api#1764
2025-12-19 12:12:41 -05:00
github-actions[bot]
d6055f102b chore(main): release 4.29.0 (#1849)
🤖 I have created a release *beep* *boop*
---


## [4.29.0](https://github.com/unraid/api/compare/v4.28.2...v4.29.0)
(2025-12-19)


### Features

* replace docker overview table with web component (7.3+)
([#1764](https://github.com/unraid/api/issues/1764))
([277ac42](277ac42046))


### Bug Fixes

* handle race condition between guid loading and license check
([#1847](https://github.com/unraid/api/issues/1847))
([8b155d1](8b155d1f1c))
* resolve issue with "Continue" button when updating
([#1852](https://github.com/unraid/api/issues/1852))
([d099e75](d099e7521d))
* update myservers config references to connect config references
([#1810](https://github.com/unraid/api/issues/1810))
([e1e3ea7](e1e3ea7eb6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-19 11:53:48 -05:00
Eli Bosley
d099e7521d fix: resolve issue with "Continue" button when updating (#1852)
- Replaced BrandLoading with BrandButton in UpdateOs component for
better user interaction.
- Updated test cases to reflect changes in rendering logic, ensuring the
account button is displayed when no reboot is pending.
- Added functionality to navigate to account update when the button is
clicked.
- Introduced WEBGUI_REDIRECT URL for handling update installations in
the store logic.
2025-12-19 11:44:19 -05:00
Pujit Mehrotra
0e44e73bf7 chore(web): mv predev call to prebuild step (#1850)
Fixes #1848

## Background

The `build:dev` script is used for the `unraid:deploy` workflow, and it
implicitly triggered the `predev` script to build the `unraid-ui`
package as needed.

`web` builds depend on `unraid-ui`. In the past, `unraid-ui` was built
during `pnpm install` via a `prepare` step in its `package.json`.
However, this approach doesn't ensure that `web` builds correctly; stale
`unraid-ui` builds could cause false-positives.

So, instead of doing that, we call `predev` from `prebuild`, ensuring
that both local builds and the `unraid:deploy` workflow lazily get the
correct build of `unraid-ui`.
2025-12-18 11:50:17 -05:00
Pujit Mehrotra
277ac42046 feat: replace docker overview table with web component (7.3+) (#1764)
## Summary

Introduces a new Vue-based Docker container management interface
replacing the legacy webgui table.

### Container Management
- Start, stop, pause, resume, and remove containers via GraphQL
mutations
- Bulk actions for managing multiple containers at once
- Container update detection with one-click updates
- Real-time container statistics (CPU, memory, I/O)

### Organization & Navigation
- Folder-based container organization with drag-and-drop support
- Accessible reordering via keyboard controls
- Customizable column visibility with persistent preferences
- Column resizing and reordering
- Filtering and search across container properties

### Auto-start Configuration
- Dedicated autostart view with delay configuration
- Drag-and-drop reordering of start/stop sequences

### Logs & Console
- Integrated log viewer with filtering and download
- Persistent console sessions with shell selection
- Slideover panel for quick access

### Networking
- Port conflict detection and alerts
- Tailscale integration for container networking status
- LAN IP and port information display

### Additional Features
- Orphaned container detection and cleanup
- Template mapping management
- Critical notifications system
- WebUI visit links with Tailscale support

<sub>PR Summary by Claude Opus 4.5</sub>
2025-12-18 11:11:05 -05:00