feat: add assets page and download functionality#1737
feat: add assets page and download functionality#1737
Conversation
- 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>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Summary
Previous Results
Insights
Fail Rate
Failed Tests
Slowest Tests
🍂 No flaky tests in this run. Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
… 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 `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>
- 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>
- 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>
* 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>
…e 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>
…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>
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>
- 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>
This reverts commit b756a42.
This reverts commit b075c0a.
* 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>
- Run npm build to generate tavern/internal/www/build/index.html - Fixes go:embed pattern failure in CI Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
This PR introduces a new "Assets" page in the Tavern UI.
/assets/download/endpoint for authenticated users.PR created automatically by Jules for task 3148273193234440162 started by @KCarretto