@striae-org/striae 4.3.2 → 4.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/app/components/actions/case-import/orchestrator.ts +1 -1
  2. package/app/components/actions/case-manage.ts +50 -14
  3. package/app/components/audit/user-audit.module.css +49 -0
  4. package/app/components/audit/viewer/audit-entries-list.tsx +130 -48
  5. package/app/components/navbar/navbar.tsx +25 -12
  6. package/app/components/sidebar/case-import/case-import.tsx +56 -14
  7. package/app/components/sidebar/case-import/components/CasePreviewSection.tsx +7 -6
  8. package/app/components/sidebar/case-import/components/ConfirmationDialog.tsx +9 -5
  9. package/app/components/sidebar/cases/cases-modal.module.css +19 -0
  10. package/app/components/sidebar/cases/cases-modal.tsx +23 -8
  11. package/app/routes/striae/hooks/use-striae-reset-helpers.ts +102 -0
  12. package/app/routes/striae/striae.tsx +72 -74
  13. package/app/routes/striae/utils/case-export.ts +37 -0
  14. package/app/routes/striae/utils/open-case-helper.ts +18 -0
  15. package/app/services/audit/audit-console-logger.ts +1 -1
  16. package/app/services/audit/audit-export-csv.ts +1 -1
  17. package/app/services/audit/audit-export-signing.ts +2 -2
  18. package/app/services/audit/audit-export.service.ts +1 -1
  19. package/app/services/audit/audit-worker-client.ts +1 -1
  20. package/app/services/audit/audit.service.ts +5 -75
  21. package/app/services/audit/builders/audit-event-builders-case-file.ts +3 -0
  22. package/app/services/audit/index.ts +2 -2
  23. package/app/types/audit.ts +8 -7
  24. package/app/utils/data/case-filters.ts +1 -1
  25. package/app/utils/ui/case-messages.ts +69 -0
  26. package/app/utils/ui/index.ts +1 -0
  27. package/package.json +5 -5
  28. package/workers/audit-worker/wrangler.jsonc.example +1 -1
  29. package/workers/data-worker/wrangler.jsonc.example +1 -1
  30. package/workers/image-worker/wrangler.jsonc.example +1 -1
  31. package/workers/keys-worker/wrangler.jsonc.example +1 -1
  32. package/workers/pdf-worker/wrangler.jsonc.example +1 -1
  33. package/workers/user-worker/wrangler.jsonc.example +1 -1
  34. package/wrangler.toml.example +1 -1
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Common messages for case import, export, and case management operations.
3
+ * Centralizing messages prevents drift and ensures consistent user experience across the app.
4
+ */
5
+
6
+ // Import validation messages
7
+ export const IMPORT_FILE_TYPE_NOT_ALLOWED =
8
+ 'Only Striae case ZIP files, confirmation ZIP files, or confirmation JSON files are allowed.';
9
+
10
+ export const IMPORT_FILE_TYPE_NOT_SUPPORTED =
11
+ 'The selected file is not a supported Striae case or confirmation import package.';
12
+
13
+ // Import blocking messages
14
+ export const ARCHIVED_REGULAR_CASE_BLOCK_MESSAGE =
15
+ 'This archived case cannot be imported because the case already exists in your regular case list. Delete the regular case before importing this archive.';
16
+
17
+ // Read-only case operations
18
+ export const CREATE_READ_ONLY_CASE_EXISTS_ERROR = (caseNumber: string): string =>
19
+ `Case "${caseNumber}" already exists as a read-only review case.`;
20
+
21
+ export const CLEAR_READ_ONLY_CASE_SUCCESS = (caseNumber: string): string =>
22
+ `Removed read-only case "${caseNumber}"`;
23
+
24
+ export const CLEAR_READ_ONLY_CASE_PARTIAL_FAILURE = (caseNumber: string): string =>
25
+ `Failed to fully clear read-only case "${caseNumber}". Please try again. If this was an archived import that overlaps a regular case, verify that all case images are accessible before retrying.`;
26
+
27
+ export const CLEAR_READ_ONLY_CASE_GENERIC_ERROR =
28
+ 'Failed to clear existing case';
29
+
30
+ export const NO_READ_ONLY_CASE_LOADED =
31
+ 'No read-only case is currently loaded.';
32
+
33
+ export const CANNOT_DELETE_READ_ONLY_CASE_FILES =
34
+ 'Cannot delete files for read-only cases.';
35
+
36
+ export const READ_ONLY_CASE_CANNOT_ARCHIVE_AGAIN =
37
+ 'This case is already read-only and cannot be archived again.';
38
+
39
+ // Data integrity messages
40
+ export const DATA_INTEGRITY_VALIDATION_PASSED = '✓ Validation passed';
41
+
42
+ export const DATA_INTEGRITY_VALIDATION_FAILED = '✗ Validation failed';
43
+
44
+ export const DATA_INTEGRITY_BLOCKED_TAMPERING =
45
+ '⚠️ Import Blocked: Data hash validation failed. This file may have been tampered with or corrupted and cannot be imported.';
46
+
47
+ // Confirmation/review messages
48
+ export const CONFIRM_CASE_IMPORT =
49
+ 'Are you sure you want to import this case for review?';
50
+
51
+ // Export operation messages
52
+ export const EXPORT_FAILED = 'Export failed. Please try again.';
53
+
54
+ export const EXPORT_ALL_FAILED = 'Export all cases failed. Please try again.';
55
+
56
+ export const ENTER_CASE_NUMBER_REQUIRED = 'Please enter a case number';
57
+
58
+ // Deletion confirmation and errors
59
+ export const DELETE_CASE_CONFIRMATION = (caseNumber: string): string =>
60
+ `Are you sure you want to delete case ${caseNumber}? This will permanently delete all associated files and cannot be undone. If any image assets are already missing (404), they will be skipped and the case deletion will continue.`;
61
+
62
+ export const DELETE_FILE_CONFIRMATION = (fileName: string): string =>
63
+ `Are you sure you want to delete ${fileName}? This action cannot be undone.`;
64
+
65
+ export const DELETE_CASE_FAILED = 'Failed to delete case.';
66
+
67
+ export const DELETE_FILE_FAILED = 'Failed to delete file.';
68
+
69
+ export const RENAME_CASE_FAILED = 'Failed to rename case.';
@@ -1,2 +1,3 @@
1
1
  export * from './annotation-timestamp';
2
+ export * from './case-messages';
2
3
  export * from './style';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@striae-org/striae",
3
- "version": "4.3.2",
3
+ "version": "4.3.4",
4
4
  "private": false,
5
5
  "description": "Striae is a specialized, cloud-native platform designed to streamline forensic firearms identification by providing an intuitive environment for digital comparison image annotation, authenticated confirmations, and automated report generation.",
6
6
  "license": "Apache-2.0",
@@ -109,18 +109,18 @@
109
109
  "deploy-workers:user": "cd workers/user-worker && npm run deploy"
110
110
  },
111
111
  "dependencies": {
112
- "@react-router/cloudflare": "^7.13.1",
112
+ "@react-router/cloudflare": "^7.13.2",
113
113
  "exceljs": "^4.4.0",
114
114
  "firebase": "^12.10.0",
115
115
  "isbot": "^5.1.36",
116
116
  "jszip": "^3.10.1",
117
117
  "react": "^19.2.4",
118
118
  "react-dom": "^19.2.4",
119
- "react-router": "^7.13.1"
119
+ "react-router": "^7.13.2"
120
120
  },
121
121
  "devDependencies": {
122
- "@react-router/dev": "^7.13.1",
123
- "@react-router/fs-routes": "^7.13.1",
122
+ "@react-router/dev": "^7.13.2",
123
+ "@react-router/fs-routes": "^7.13.2",
124
124
  "@types/react": "^19.2.14",
125
125
  "@types/react-dom": "^19.2.3",
126
126
  "@typescript-eslint/eslint-plugin": "^8.57.1",
@@ -2,7 +2,7 @@
2
2
  "name": "AUDIT_WORKER_NAME",
3
3
  "account_id": "ACCOUNT_ID",
4
4
  "main": "src/audit-worker.ts",
5
- "compatibility_date": "2026-03-22",
5
+ "compatibility_date": "2026-03-23",
6
6
  "compatibility_flags": [
7
7
  "nodejs_compat"
8
8
  ],
@@ -3,7 +3,7 @@
3
3
  "name": "DATA_WORKER_NAME",
4
4
  "account_id": "ACCOUNT_ID",
5
5
  "main": "src/data-worker.ts",
6
- "compatibility_date": "2026-03-22",
6
+ "compatibility_date": "2026-03-23",
7
7
  "compatibility_flags": [
8
8
  "nodejs_compat"
9
9
  ],
@@ -2,7 +2,7 @@
2
2
  "name": "IMAGES_WORKER_NAME",
3
3
  "account_id": "ACCOUNT_ID",
4
4
  "main": "src/image-worker.ts",
5
- "compatibility_date": "2026-03-22",
5
+ "compatibility_date": "2026-03-23",
6
6
  "compatibility_flags": [
7
7
  "nodejs_compat"
8
8
  ],
@@ -2,7 +2,7 @@
2
2
  "name": "KEYS_WORKER_NAME",
3
3
  "account_id": "ACCOUNT_ID",
4
4
  "main": "src/keys.ts",
5
- "compatibility_date": "2026-03-22",
5
+ "compatibility_date": "2026-03-23",
6
6
  "compatibility_flags": [
7
7
  "nodejs_compat"
8
8
  ],
@@ -2,7 +2,7 @@
2
2
  "name": "PDF_WORKER_NAME",
3
3
  "account_id": "ACCOUNT_ID",
4
4
  "main": "src/pdf-worker.ts",
5
- "compatibility_date": "2026-03-22",
5
+ "compatibility_date": "2026-03-23",
6
6
  "compatibility_flags": [
7
7
  "nodejs_compat"
8
8
  ],
@@ -2,7 +2,7 @@
2
2
  "name": "USER_WORKER_NAME",
3
3
  "account_id": "ACCOUNT_ID",
4
4
  "main": "src/user-worker.ts",
5
- "compatibility_date": "2026-03-22",
5
+ "compatibility_date": "2026-03-23",
6
6
  "compatibility_flags": [
7
7
  "nodejs_compat"
8
8
  ],
@@ -1,6 +1,6 @@
1
1
  #:schema node_modules/wrangler/config-schema.json
2
2
  name = "PAGES_PROJECT_NAME"
3
- compatibility_date = "2026-03-22"
3
+ compatibility_date = "2026-03-23"
4
4
  compatibility_flags = ["nodejs_compat"]
5
5
  pages_build_output_dir = "./build/client"
6
6