2.5 KiB
2.5 KiB
Developer Memory Log
This document records the exact state of the project, completed features, solved bugs, and historical changes to maintain continuity.
1. Core Completed Features
A. Onboarding Legal Skip & MFA Control
- Onboarding Skip: Implemented "None (No agreement required)" legal options. When a partner is invited or updated with no NDA/MSA requirement, the backend
AuthServiceautomatically bypasses signing steps and sets the user's status toAPPROVED. - MFA Toggle: Added
mfaEnabledoptions inside the partner invitation modal, partner editing forms, and backend API routes.
B. Client-Side Document Previews
- Word Document Preview: Integrated
docx-previewto parse raw OpenXML array buffers and render them in-browser. - Spreadsheet & CSV Preview: Integrated SheetJS (
xlsx) to parse spreadsheet buffers and generate clean HTML cell tables. - Online Preview Button: Enabled online preview buttons (Eye icon) for CSV files and text/code files by expanding the
isRenderableutility inAssetCard.tsx.
C. Responsive Full-Bleed Thumbnails
- Word & Spreadsheet Card Thumbnails: Replaced static placeholders with dynamic rendered previews of the first page/sheet.
- Responsive Scaling: Integrated a React
ResizeObserverhook insideDocxThumbnail.tsxandSpreadsheetThumbnail.tsxto automatically calculate scaling factor based on card width, making cards fit their containers perfectly instead of sticking to the top-left corner.
D. Clean Admin Deletion
- S3 Deletion Hook: Updated backend
AssetService.deleteAssetto detect files under/uploads/and dispatch aDeleteObjectCommandto the MinIO container bucket, cleaning up disk space on deletion.
2. Key Resolved Bugs
A. CSV Text Preview Bypass
- Symptom: CSV files were being treated as plain text files, rendering as comma-separated text blocks in a code viewport.
- Resolution: Excluded
.csvfiles and mime-types from theisTextOrCodeAssetfilter insideAssetViewerModal.tsx. This routed them correctly to the SheetJS spreadsheet parser.
B. Dark Mode Cell Invisible Text
- Symptom: In dark mode, spreadsheet/CSV cells rendered as blank grids because text inherited the light mode/system white text color.
- Resolution: Added explicit
.excel-thumbnail-container table { color: #0f172a }and.excel-preview-container table { color: #0f172a }CSS rules to override dark mode layout text colors and keep tables fully readable.