Files
kite/.planning/phases/06.2-close-v1-sharing-cloud-delete-csv-export-gaps/06.2-UAT.md
T

143 lines
8.7 KiB
Markdown

---
status: diagnosed
phase: 06.2-close-v1-sharing-cloud-delete-csv-export-gaps
source: [06.2-01-SUMMARY.md, 06.2-02-SUMMARY.md, 06.2-03-SUMMARY.md, 06.2-04-SUMMARY.md]
started: 2026-05-31T12:00:00Z
updated: 2026-05-31T12:00:00Z
---
## Current Test
<!-- OVERWRITE each test - shows where we are -->
[testing complete]
## Tests
### 1. Shared Badge Display
expected: Go to the document list. Find a document you have shared with someone (or share one now). The document card should show a "Shared" pill/badge. Documents you haven't shared should show no badge.
result: issue
reported: "I cannot share the document as I don't see the username in the admin user tab or even in the user settings nowhere. There is no profile or anything to change or update the information as the user."
severity: major
### 2. Share with Permission Dropdown
expected: Open the Share dialog for a document. The form should have a "Permission level" dropdown with "Can view" and "Can edit" options (default: Can view). Creating a share with "Can edit" selected should store that permission.
result: pass
### 3. Update Share Permission Toggle
expected: Open the Share dialog for a document that is already shared. Each recipient row should have a View/Edit toggle. Clicking the toggle changes the permission — the change is reflected immediately (optimistic update).
result: skipped
reason: no existing shares to test against (blocked by test 1 issue — handle not visible)
### 4. Cloud Document Delete Propagation
expected: Delete a document that is stored in a cloud backend (OneDrive, Google Drive, etc.). The delete should also remove the file from the cloud provider. The document disappears from the list.
result: issue
reported: "I neither can open, view or delete any files or folders inside the cloud storage"
severity: major
### 5. Cloud Delete Failure Warning Modal
expected: When a cloud document delete fails on the provider side (the cloud is unreachable), a warning modal should appear showing the provider name (e.g. "OneDrive") and a "Remove from app" button alongside a Cancel option. The document is NOT deleted yet at this point.
result: blocked
blocked_by: prior-phase
reason: "Cloud storage files cannot be opened, viewed, or deleted — blocked by same issue as test 4"
### 6. Remove from App (Cloud Failure Path)
expected: In the cloud delete failure modal, clicking "Remove from app" deletes only the DB record (the document disappears from the list) without retrying the cloud deletion. No quota change occurs since cloud docs don't count against quota.
result: blocked
blocked_by: prior-phase
reason: "Cloud storage files cannot be opened, viewed, or deleted — blocked by same issue as test 4"
### 7. Audit Log Shows User Handles
expected: As an admin, open the Audit Log tab. Each log entry should show a user handle (e.g. @alice) in the user and actor columns instead of raw UUIDs.
result: issue
reported: "I see the usernames yes but without a @ symbol."
severity: minor
### 8. Audit Log Filter by Handle
expected: In the Audit Log tab, filter by user handle (type a handle in the "User handle" field and apply). Only entries for that user should appear. Filtering by a handle that doesn't exist returns an empty list (not an error).
result: pass
### 9. CSV Export via Fetch+Blob
expected: Click the CSV export button in the Audit Log tab. The browser should download a CSV file (no redirect via window.location.href — the download happens via the Blob pattern). The CSV should include user_handle and actor_handle columns.
result: issue
reported: "Yes I downloaded a csv file but except an header (title of rows) the csv is empty."
severity: major
### 10. Daily Exports Section
expected: In the Audit Log tab, there should be a "Daily exports" section below the main log. It shows a list of available export dates (from MinIO). If no daily exports exist yet, the section shows an empty state.
result: pass
### 11. Download Daily Export
expected: In the "Daily exports" section, select a date from the dropdown and click Download. The file downloads as audit-{date}.csv. If the backend is not MinIO, the section shows no items (graceful fallback).
result: skipped
reason: daily exports list is empty — no Celery-generated files exist yet to download
## Summary
total: 11
passed: 3
issues: 4
pending: 0
skipped: 2
blocked: 2
## Gaps
- truth: "User can see their own username/handle in the UI (settings, profile, or admin user tab) in order to share documents with others"
status: failed
reason: "User reported: I cannot share the document as I don't see the username in the admin user tab or even in the user settings nowhere. There is no profile or anything to change or update the information as the user."
severity: major
test: 1
root_cause: "AccountView.vue 'Account information' section renders only email and role — the handle field from authStore.user is never displayed, even though GET /api/auth/me returns it. Users cannot discover their own handle or other users' handles, making the share dialog (which requires a recipient handle) unusable in practice."
artifacts:
- path: "frontend/src/views/AccountView.vue:10-23"
issue: "Account information section shows email and role only — handle field missing"
missing:
- "Add handle display to AccountView.vue account information section: `<div><span class='text-gray-500'>Username:</span> {{ authStore.user?.handle }}</div>`"
- "Consider also showing handles in AdminUsersTab so admins can look up other users' handles"
debug_session: ""
- truth: "CSV export downloads a file containing audit log data rows (not just a header line)"
status: failed
reason: "User reported: Yes I downloaded a csv file but except an header (title of rows) the csv is empty."
severity: major
test: 9
root_cause: "Export silently respects the active user_handle filter; after testing the 'unknown handle → empty list' case in test 8, the stale unknown handle filter was still active when Export was clicked — producing an empty CSV. No backend bug: code is correct, but there is no UI feedback showing which filters the export will apply, and no easy way to clear filters before exporting."
artifacts:
- path: "frontend/src/components/admin/AuditLogTab.vue"
issue: "exportCsv() passes current filters.user_handle to the export with no indication to user; no 'Clear filters' action available"
missing:
- "Add a visible 'Active filters' indicator near the Export button"
- "Add a 'Clear filters' button that resets all filter fields and re-fetches"
debug_session: ""
- truth: "Audit log entries show user handles prefixed with @ (e.g. @alice) instead of plain usernames or raw UUIDs"
status: failed
reason: "User reported: I see the usernames yes but without a @ symbol."
severity: minor
test: 7
root_cause: "The handle column in the User model stores the bare username without a leading @. The backend returns it as-is and the frontend renders it directly — the @ prefix is never applied anywhere in the pipeline."
artifacts:
- path: "frontend/src/components/admin/AuditLogTab.vue:95"
issue: "Renders entry.user_handle directly with no @ prefix"
- path: "backend/api/audit.py:86-87"
issue: "_audit_to_dict_with_handles() returns handle verbatim from User.handle column"
missing:
- "Frontend fix only: change line 95 from `entry.user_handle || entry.user_id || '—'` to `entry.user_handle ? '@' + entry.user_handle : (entry.user_id || '—')`"
debug_session: ""
- truth: "Cloud-stored documents can be opened, viewed, and deleted through the UI"
status: failed
reason: "User reported: I neither can open, view or delete any files or folders inside the cloud storage"
severity: major
test: 4
root_cause: "The cloud folder browser (/cloud/:provider/:folderId) calls GET /api/cloud/folders/{provider}/{folderId} which returns 404 if no ACTIVE CloudConnection exists for the user. If no cloud provider has been connected (or the OAuth token has expired), the browser shows 'Failed to load folder contents' with no guidance. Cloud-delete propagation built in Phase 6.2 cannot be tested without a working cloud connection."
artifacts:
- path: "frontend/src/views/CloudFolderView.vue:133"
issue: "Error message 'Failed to load folder contents' is shown with no indication of whether the cause is missing connection or expired token"
- path: "backend/api/cloud.py:802-806"
issue: "Returns 404 when no ACTIVE connection found — no distinction between 'never connected' and 'token expired'"
missing:
- "CloudFolderView should check connection status before attempting folder load and show actionable error (e.g. 'Connect a cloud provider in Settings')"
- "Or: prerequisite — user must connect a cloud provider in Settings before this feature can be tested"
debug_session: ""