aglinxinyuan opened a new pull request, #7435:
URL: https://github.com/apache/texera/pull/7435

   ### What changes were proposed in this PR?
   
   The dataset explorer's toolbar and upload panel are template-only, and the 
suite around them drives component state without asserting on what reaches the 
screen.
   
   Adds 14 tests. The download gating is the part that matters — both the 
per-file and whole-version downloads are guarded by `!isLogin || 
!isDownloadAllowed()`, and each half is pinned separately, since being signed 
in is not on its own permission to copy someone else's non-downloadable dataset.
   
   Also covered: exactly one of Maximize/Minimize showing, so the user always 
has a way back; the copy-path control appearing only once a file is on screen; 
the file size and version creation time appearing only when known; and the 
upload panel reporting no statistics while initializing, live speed and both 
timings while running, and a single total once finished or aborted.
   
   **Verified by mutation**, all reverted (template diff empty):
   
   | Mutation | Result |
   |---|---|
   | file download ignores `isLogin` | red |
   | file download ignores `isDownloadAllowed()` | red |
   | whole-version download ungated | red |
   | Maximize shown regardless of state | red |
   | Minimize shown regardless of state | red |
   | copy-path always offered | red |
   | file-size block always rendered | red |
   | creation-time row always rendered | red |
   | statistics shown while still initializing | red |
   | live figures kept after finishing | red |
   | total time shown only when finished, not when aborted | red |
   
   Two structural notes are commented in the spec, since both cost a debugging 
round:
   
   - `nz-tabs` only instantiates the active tab, and this toolbar lives in the 
second one, so nothing in it exists until that tab is selected.
   - The upload panel is gated on the separate `activeUploads` counter rather 
than on `uploadTasks`, and ng-zorro collapses it by default.
   
   No production file is touched.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7432
   
   ### How was this PR tested?
   
   ```
   npx ng test --watch=false --include="**/dataset-detail.component.spec.ts"
   ```
   
   ```
    Test Files  1 passed (1)
         Tests  129 passed (129)
   ```
   
   14 new on top of the existing 115. `yarn format:ci` passes.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to