- Added refreshStatus method to update connection status immediately after settings changes.
- Enhanced error reporting with reportAuthError method for better authentication feedback.
- Updated status visuals in the status modal to reflect the new centralized structure.
- Improved connection handling in the settings tab to ensure accurate status representation.
- Changed initial status to "needs-setup" to prompt user configuration.
- Added a refreshStatus method to SyncEngine for immediate status updates after settings changes.
- Enhanced connection indicator logic in the settings tab to reflect the new status.
- Introduced "needs-setup" status visual for improved user feedback on configuration requirements.
- Introduced a new `status-visuals.ts` file to centralize status icons and labels for consistency across the plugin.
- Updated connection indicator logic in the settings tab to utilize the new centralized visuals.
- Removed deprecated connection visual methods to streamline the codebase.
- Enhanced error handling in the status bar to reflect the new status visuals structure.
- Introduced an authentication block mechanism to prevent repeated invalid token submissions.
- Updated notification logic to provide clearer feedback on API token status.
- Refactored status visuals for better clarity and consistency in the user interface.
- Improved connection handling in the sync engine to ensure robust error management.
- Changed plugin ID from "surfsense" to "surfsense-obsidian" for clarity.
- Updated version from "0.1.1" to "0.1.0" in manifest and versions files.
- Modified author URL to point to the official SurfSense website.
- Adjusted GitHub release workflow to ensure compatibility with Obsidian and BRAT.
- Updated styling for toggle buttons in DocumentsFilters for improved visual feedback.
- Added toolbar actions prop to PdfViewer for customizable actions in the zoom toolbar.
- Introduced download functionality in ReportPanel with a new Download icon.
- Refactored ReportCard to remove word count and display version labels for better clarity.
- Enhanced GenerateResume component to fetch and display version information for resumes.
Fixes#1245. Deduplicate the anonymous-chat file upload request, which
was inlined verbatim in DocumentsSidebar.tsx and free-composer.tsx
while anonymousChatApiService.uploadDocument already existed.
Key change: service now returns a discriminated result instead of
throwing on 409. Callers need to distinguish 409 (quota exceeded, ->
gate to login) from other non-OK responses (real errors, -> throw).
export type AnonUploadResult =
| { ok: true; data: { filename: string; size_bytes: number } }
| { ok: false; reason: "quota_exceeded" };
Both call sites now do:
const result = await anonymousChatApiService.uploadDocument(file);
if (!result.ok) {
if (result.reason === "quota_exceeded") gate("upload more documents");
return;
}
const data = result.data;
Dropped the BACKEND_URL import in both files (no longer used). Verified
zero remaining /api/v1/public/anon-chat/upload references in
surfsense_web/.