Skip to content

Feat/assets page#1765

Merged
KCarretto merged 19 commits intomainfrom
feat/assets-page
Feb 9, 2026
Merged

Feat/assets page#1765
KCarretto merged 19 commits intomainfrom
feat/assets-page

Conversation

@KCarretto
Copy link
Collaborator

Summary

Adds a new <Assets /> page for operators to upload, download, and share assets. Assets can be loaded by implants (via the fetch_asset API) or by creating a shareable link. Links may be configured to have a maximum download limit and are required to have an expiry date.

Screenshots

Overview

image

Expanded Accordion Links

image

Filters & Sorting

image image

Uploading Assets

image image image

Creating Links

image image image

KCarretto and others added 4 commits February 7, 2026 15:15
* feat(www): add assets page and backend download endpoint

- Add `cdn.NewDownloadHandler` to `tavern/app.go` at `/assets/download/`.
- Create `tavern/internal/www/src/pages/assets` with `Assets.tsx` and components.
- Implement `AssetsTable`, `CreateLinkModal`, `UploadAssetModal`.
- Add `useAssets` hook with GraphQL queries.
- Register `/assets` route in `App.tsx` and navigation.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* feat(www): enhance assets page with new sorting, styling, and details view

- Refactor `AssetsTable` to use `lucide-react` icons.
- Disable client-side header sorting in favor of backend sorting.
- Implement row expansion (`AssetAccordion`) to show links and tomes.
- Update `CreateLinkModal` styling to match other modals.
- Update `SortContext` and `SortingControls` to support Assets sorting.
- Add `Breadcrumbs` to Assets page.
- Update `useAssets` query to fetch nested link and tome details.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* fix(www): resolve typescript errors in assets page

- Fix `AssetNode` interface definition in `interfacesQuery.ts` to include `edges` for `links` and `tomes`.
- Fix duplicate import in `SortContext.tsx`.
- Resolve `TS2339` error in `AssetAccordion.tsx` by ensuring correct types.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* feat(www): enhance assets page with new styling and functionality

- Refactor `AssetsTable` to use `lucide-react` icons.
- Disable client-side header sorting in favor of backend sorting.
- Implement row expansion (`AssetAccordion`) to show links.
- Update `CreateLinkModal` styling to match other modals.
- Update `SortContext` and `SortingControls` to support Assets sorting.
- Add `Breadcrumbs` to Assets page.
- Update `useAssets` query to fetch nested link and tome details.
- Add random string generation for new links.
- Add "Copy to Clipboard" for hashes and links.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* fix(www): resolve typescript interface and build errors

- Overwrite `tavern/internal/www/src/utils/interfacesQuery.ts` to ensure `AssetNode` interface correctly includes `edges` for `links` and `tomes`.
- Fix duplicate import in `SortContext.tsx`.
- Verify build passes locally.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* some updates

* Enhance Assets page with creator info and improved link controls (#1742)

* feat: update Assets page with creator info, responsive table, and link controls

- Add `creator` field to `AssetNode` interface and GraphQL query.
- Add "Creator" column to Assets table using `UserImageAndName`.
- Implement responsive column hiding for Assets table (hide Size, Hash, Links, Created on mobile).
- Fix "Tome" icon display and conditional row expansion.
- Add "Limit Downloads" checkbox to Create Link modal.
- Sort asset links by Unexpired > Unlimited > Most Remaining Downloads.
- Update link expiration text to show "Expired" when appropriate.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* feat: update Assets page with creator info, responsive table, and link controls

- Add `creator` field to `AssetNode` interface and GraphQL query.
- Add "Creator" column to Assets table using `UserImageAndName`.
- Implement responsive column hiding for Assets table (hide Size, Hash, Links, Created on mobile).
- Fix "Tome" icon display and conditional row expansion.
- Add "Limit Downloads" checkbox to Create Link modal.
- Sort asset links by Unexpired > Unlimited > Most Remaining Downloads.
- Update link expiration text to show "Expired" when appropriate.
- Increase spacing for Tome icon and Creator column to prevent overlap.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* feat: update Assets page with creator info, responsive table, and link controls

- Add `creator` field to `AssetNode` interface and GraphQL query.
- Add "Creator" column to Assets table using `UserImageAndName`.
- Implement responsive column hiding for Assets table (hide Size, Hash, Links, Created on mobile).
- Fix "Tome" icon display and conditional row expansion.
- Add "Limit Downloads" checkbox to Create Link modal.
- Sort asset links by Unexpired > Unlimited > Most Remaining Downloads.
- Update link expiration text to show "Expired" when appropriate.
- Increase spacing for Tome icon and Creator column to prevent overlap.
- Set minimum width for Name and Creator columns.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* feat: update Assets page with creator info, responsive table, and link controls

- Add `creator` field to `AssetNode` interface and GraphQL query.
- Add "Creator" column to Assets table using `UserImageAndName`.
- Implement responsive column hiding for Assets table with progressive breakpoints to avoid horizontal scroll.
- Fix "Tome" icon display and conditional row expansion.
- Add "Limit Downloads" checkbox to Create Link modal.
- Sort asset links by Unexpired > Unlimited > Most Remaining Downloads.
- Update link expiration text to show "Expired" when appropriate.
- Increase spacing for Tome icon and Creator column to prevent overlap.
- Set minimum width for Name and Creator columns.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* feat: update Assets page with creator info, responsive table, link controls, and name truncation

- Add `creator` field to `AssetNode` interface and GraphQL query.
- Add "Creator" column to Assets table using `UserImageAndName`.
- Implement responsive column hiding for Assets table with progressive breakpoints.
- Fix "Tome" icon display and conditional row expansion.
- Add "Limit Downloads" checkbox to Create Link modal.
- Sort asset links by Unexpired > Unlimited > Most Remaining Downloads.
- Update link expiration text to show "Expired" when appropriate.
- Increase spacing for Tome icon and Creator column to prevent overlap.
- Set minimum width for Name and Creator columns.
- Implement intelligent asset name truncation (handling paths) and click-to-copy functionality.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* feat: update Assets page with creator info, responsive table, link controls, name truncation, and refresh logic

- Add `creator` field to `AssetNode` interface and GraphQL query.
- Add "Creator" column to Assets table using `UserImageAndName`.
- Implement responsive column hiding for Assets table with progressive breakpoints.
- Fix "Tome" icon display and conditional row expansion.
- Add "Limit Downloads" checkbox to Create Link modal.
- Sort asset links by Unexpired > Unlimited > Most Remaining Downloads.
- Update link expiration text to show "Expired" when appropriate.
- Increase spacing for Tome icon and Creator column to prevent overlap.
- Set minimum width for Name and Creator columns.
- Implement intelligent asset name truncation (handling paths) and click-to-copy functionality.
- Add "File Plus" icon for assets not referenced by any tomes with tooltip.
- Wire up automatic table refresh after creating a link or uploading an asset.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Assets page updates: Link creator, disable button, filters, responsive columns (#1744)

* Update Assets page with Link creator, disable link button, filters, and responsive columns

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Update Assets page with Link creator, disable link button, filters, and responsive columns

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Assets Page Enhancements: Bulk Upload, Link Shortcuts, Last Modified Column (#1745)

* Enhance Assets page with bulk upload, link duration shortcuts, and last modified column

- Add `formatRelativeTime` helper for succinct relative timestamps (e.g., "5s ago", "1h 15m ago").
- Update `CreateLinkModal` to use `Tabs` (simulating segmented control) for selecting link duration: "10min", "1hr", or "Custom".
- Add "Last Modified" column to `AssetsTable`, visible on large screens, using `formatRelativeTime`.
- Add info tooltip to "Hash" column header in `AssetsTable`.
- Update `AssetAccordion` to hide the copy-link button for expired or exhausted links.
- Refactor `UploadAssetModal` to support bulk file uploads and recursive folder uploads using `webkitdirectory`.
- Add progress tracking and error reporting to the upload process.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Enhance Assets page with bulk upload, link duration shortcuts, and last modified column

- Add `formatRelativeTime` helper for succinct relative timestamps (e.g., "5s ago", "1h 15m ago").
- Update `CreateLinkModal` to use `Tabs` (simulating segmented control) for selecting link duration: "10min", "1hr", or "Custom".
- Add "Last Modified" column to `AssetsTable`, visible on large screens, using `formatRelativeTime`.
- Add info tooltip to "Hash" column header in `AssetsTable`.
- Update `AssetAccordion` to hide the copy-link button for expired or exhausted links.
- Refactor `UploadAssetModal` to support bulk file uploads and recursive folder uploads using `webkitdirectory`.
- Add progress tracking and error reporting to the upload process.
- Update `AlertError` component to support `ReactNode` details and `whitespace-pre-wrap`.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Enhance Assets page with bulk upload, link duration shortcuts, and last modified column

- Add `formatRelativeTime` helper for succinct relative timestamps (e.g., "5s ago", "1h 15m ago").
- Update `CreateLinkModal` to use `Tabs` (simulating segmented control) for selecting link duration: "10min", "1hr", or "Custom".
- Add "Last Modified" column to `AssetsTable`, visible on large screens, using `formatRelativeTime`.
- Add info tooltip to "Hash" column header in `AssetsTable`.
- Update `AssetAccordion` to hide the copy-link button for expired or exhausted links.
- Refactor `UploadAssetModal` to support bulk file uploads and recursive folder uploads using `webkitdirectory`.
- Add progress tracking and error reporting to the upload process.
- Update `AlertError` component to support `ReactNode` details and `whitespace-pre-wrap`.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Enhance Assets page with bulk upload, link duration shortcuts, and last modified column

- Add `formatRelativeTime` helper for succinct relative timestamps (e.g., "5s ago", "1h 15m ago").
- Update `CreateLinkModal` to use `Tabs` (simulating segmented control) for selecting link duration: "10min", "1hr", or "Custom".
- Add "Last Modified" column to `AssetsTable`, visible on large screens, using `formatRelativeTime`.
- Add info tooltip to "Hash" column header in `AssetsTable`.
- Update `AssetAccordion` to hide the copy-link button for expired or exhausted links.
- Refactor `UploadAssetModal` to support bulk file uploads and recursive folder uploads using `webkitdirectory`.
- Add progress tracking and error reporting to the upload process.
- Update `AlertError` component to support `ReactNode` details and `whitespace-pre-wrap`.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Enhance Assets page with bulk upload, link duration shortcuts, and last modified column

- Add `formatRelativeTime` helper for succinct relative timestamps (e.g., "5s ago", "1h 15m ago").
- Update `CreateLinkModal` to use `Tabs` (simulating segmented control) for selecting link duration: "10min", "1hr", or "Custom".
- Add "Last Modified" column to `AssetsTable`, visible on large screens, using `formatRelativeTime`.
- Add info tooltip to "Hash" column header in `AssetsTable`.
- Update `AssetAccordion` to hide the copy-link button for expired or exhausted links.
- Refactor `UploadAssetModal` to support bulk file uploads and recursive folder uploads using `webkitdirectory`.
- Add progress tracking and error reporting to the upload process.
- Allow renaming of assets when uploading a single file.
- Update `AlertError` component to support `ReactNode` details and `whitespace-pre-wrap`.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Enhance Assets page with bulk upload, link duration shortcuts, and last modified column

- Add `formatRelativeTime` helper for succinct relative timestamps (e.g., "5s ago", "1h 15m ago").
- Update `CreateLinkModal` to use `Tabs` (simulating segmented control) for selecting link duration: "10min", "1hr", or "Custom".
- Add "Last Modified" column to `AssetsTable`, visible on large screens, using `formatRelativeTime`.
- Add info tooltip to "Hash" column header in `AssetsTable`.
- Update `AssetAccordion` to hide the copy-link button for expired or exhausted links.
- Refactor `UploadAssetModal` to support bulk file uploads and recursive folder uploads using `webkitdirectory`.
- Add progress tracking and error reporting to the upload process.
- Allow renaming of assets when uploading a single file.
- Fix `Button` component to correctly respect the `type` prop (preventing accidental form submissions).
- Update `AlertError` component to support `ReactNode` details and `whitespace-pre-wrap`.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* npm build

* minor tweaks and build

* Fix pagination bug in Assets page (#1748)

When navigating backwards in the Assets page, the previous query variables (first/after) were being merged with the new variables (last/before), causing a GraphQL error or invalid query state. This change explicitly clears the unused pagination variables in `useAssets` hook.

Verified with a reproduction unit test that simulated the issue and confirmed the fix.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* npm run build

* npm run build

* fix(ci): resolve rust compilation error in imix agent

- Ensure `implants/imix/src/agent.rs` uses `tokio::runtime::Handle` instead of `std::runtime::Handle`, fixing `error[E0433]: failed to resolve: could not find runtime in std`.
- Re-apply frontend fixes for `AssetNode` interface and `SortContext`.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* some local fixes

* Revert "some local fixes"

This reverts commit b756a42.

* Revert "fix(ci): resolve rust compilation error in imix agent"

This reverts commit b075c0a.

* git is stupid

* Assets Page Improvements (#1760)

* Assets page improvements: styling, validation, filtering, and upload flow.

- Standardized font size in AssetsTable.
- Moved "Expire link" button to link header, updated icon and tooltip.
- Enhanced UploadAssetModal with file size limit (100MB), status indicators, and disabled actions during upload.
- Added client-side validation for CreateLinkModal expiry date using Yup.
- Added filtering by Creator in Assets page.
- Replaced formatRelativeTime with moment.js.
- Added moment dependency.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Assets page improvements: styling, validation, filtering, and upload flow.

- Standardized font size in AssetsTable.
- Moved "Expire link" button to link header, updated icon and tooltip.
- Enhanced UploadAssetModal with file size limit (100MB), status indicators, and disabled actions during upload.
- Added client-side validation for CreateLinkModal expiry date using Yup.
- Added filtering by Creator in Assets page.
- Replaced formatRelativeTime with moment.js.
- Added moment dependency.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
* Refactor CreateLinkModal and UploadAssetsModal to use Formik for state management. Update UploadAssetsModal UI to display file cards with status, progress, and renaming capabilities.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Refactor Assets Modals to use Formik and Update Upload UI

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* stuff

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
- Replaced input field with text display for the created link.
- Added "Close" and "Copy & Close" buttons.
- "Copy & Close" is the primary action and copies the link to clipboard.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
2558    ±0 2558    ±0 0    ±0 0    ±0 0    ±0 0    ±0 1ms    ±0

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#920 2558 2558 0 0 0 0 29.8s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
2558 0 0 5.2s

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
eldritch-libsys: std::dll_inject_impl::tests::test_dll_inject_simple 1 5.2s 5.2s
imix::bin/imix: install::tests::test_install_execution 3 1.2s 3.3s
imix::bin/imix: install::tests::test_install_execution 3 1.2s 3.3s
imix::bin/imix: install::tests::test_install_execution 3 1.2s 3.3s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_error 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_error 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_error 3 3.0s 3.0s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@KCarretto KCarretto requested review from cmp5987 and hulto February 7, 2026 23:09
@KCarretto KCarretto marked this pull request as ready for review February 8, 2026 00:01
cmp5987
cmp5987 previously requested changes Feb 8, 2026
KCarretto and others added 4 commits February 7, 2026 20:08
#1767)

Refactored Assets.tsx to conditionally render CreateLinkModal and UploadAssetModal, ensuring they unmount when closed. This allowed removing unnecessary useEffect hooks that were resetting state in those components. Added unit tests for CreateLinkModal.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
@KCarretto KCarretto requested a review from cmp5987 February 8, 2026 05:40
KCarretto and others added 3 commits February 8, 2026 11:22
…#1770)

This change renames `creatorId` to `userId` in the `FilterContext` and related components to allow for more generic user filtering, as requested.
It also updates the `FilterFieldType.CREATOR` to `FilterFieldType.USER`.
Existing tests have been updated and pass.

Changes:
- `tavern/internal/www/src/context/FilterContext/FilterContext.tsx`: Renamed `creatorId` to `userId` and `CREATOR` to `USER`. Updated `STORAGE_KEY`.
- `tavern/internal/www/src/context/FilterContext/FilterControls.tsx`: Updated to use `FilterFieldType.USER`.
- `tavern/internal/www/src/components/UserFilterBar.tsx`: Updated to use `filters.userId`.
- `tavern/internal/www/src/pages/assets/Assets.tsx`: Updated to use `filters.userId`.
- `tavern/internal/www/src/context/FilterContext/__tests__/FilterContext.test.tsx`: Updated tests.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
KCarretto and others added 3 commits February 8, 2026 12:23
)

- Export MAX_FILE_SIZE constant from upload.ts
- Import MAX_FILE_SIZE in UploadAssetModal.tsx
- Add file size check in handleFileChange
- Set file status to 'error' and display error message immediately if file exceeds limit
- Add unit test for file size validation
- Add data-testid to file input for testing

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
cmp5987
cmp5987 previously approved these changes Feb 9, 2026
@KCarretto KCarretto enabled auto-merge February 9, 2026 03:18
@KCarretto KCarretto added this pull request to the merge queue Feb 9, 2026
Merged via the queue into main with commit 6a9fb96 Feb 9, 2026
8 checks passed
@KCarretto KCarretto deleted the feat/assets-page branch February 9, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants