ATlast — you'll never need to find your favorites on another platform again. Find your favs in the ATmosphere.
atproto

fix: correct function name to handleLoadUpload in uploadId useEffect

byarielm.fyi b6b8c396 581ed00f

verified
Changed files
+127 -20
docs
packages
web
src
+26 -18
docs/git-history.json
··· 1 1 [ 2 2 { 3 + "hash": "581ed00fec3c0c5f472c6ff92e00bf4ed5b27e9a", 4 + "short_hash": "581ed00", 5 + "author": "Ariel M. Lighty", 6 + "date": "2025-12-26T13:47:37-05:00", 7 + "message": "fix extension import: use bulkCreate and handle uploadId param\n\nBackend fixes:\n- Use SourceAccountRepository.bulkCreate() instead of non-existent upsertSourceAccount()\n- Change redirectUrl from /results?uploadId= to /?uploadId=\n- More efficient bulk insert instead of loop\n\nFrontend fixes:\n- Add useEffect to load results when uploadId param present\n- Calls loadUploadResults(uploadId) automatically on page load\n- Cleans up URL param after loading\n\nResolves:\n- \"sourceAccountRepo.upsertSourceAccount is not a function\" error\n- \"No routes matched location /results?uploadId=...\" routing error", 8 + "files_changed": 4 9 + }, 10 + { 3 11 "hash": "9ca734749fbaa014828f8437afc5e515610afd31", 4 12 "short_hash": "9ca7347", 5 13 "author": "Ariel M. Lighty", ··· 8 16 "files_changed": 4 9 17 }, 10 18 { 11 - "hash": "95636330f387598f55017eda668fb9f91ccde509", 12 - "short_hash": "9563633", 19 + "hash": "9ca734749fbaa014828f8437afc5e515610afd31", 20 + "short_hash": "9ca7347", 13 21 "author": "Ariel M. Lighty", 14 - "date": "2025-12-26T13:35:52-05:00", 15 - "message": "fix extension api-client: unwrap ApiResponse.data structure\n\nBackend endpoints use successResponse() which wraps data in:\n { success: true, data: {...} }\n\nExtension was expecting flat response structure, causing:\n- uploadToATlast to return undefined (missing importId, redirectUrl)\n- checkSession to return wrapped object instead of user data\n- Invalid URL error: \"http://127.0.0.1:8888undefined\"\n\nFixed both uploadToATlast and checkSession to access apiResponse.data", 16 - "files_changed": 2 22 + "date": "2025-12-26T13:37:24-05:00", 23 + "message": "update documentation: extension ready for testing after API response fix", 24 + "files_changed": 4 17 25 }, 18 26 { 19 27 "hash": "95636330f387598f55017eda668fb9f91ccde509", ··· 40 48 "files_changed": 1 41 49 }, 42 50 { 43 - "hash": "d0bcf337b6d223a86443f6f67767e87b74e4dd7d", 44 - "short_hash": "d0bcf33", 51 + "hash": "b00ecad7a2c576962cb78de5b50f301e4664830e", 52 + "short_hash": "b00ecad", 45 53 "author": "Ariel M. Lighty", 46 54 "date": "2025-12-26T00:26:09-05:00", 47 55 "message": "refactor extension to require authentication and use proper upload flow\n\nRemoved temporary storage approach and implemented proper authentication flow:\n\nExtension changes:\n- Added session check to popup init flow (checkSession in api-client)\n- Added \"not logged in\" state with login prompts\n- Updated uploadToATlast to include credentials for cookie-based auth\n- Extension now requires user to be logged in BEFORE scanning\n\nBackend changes:\n- Converted extension-import to AuthenticatedHandler (requires auth)\n- Now creates upload records immediately (no temporary storage)\n- Removed extension_imports table from database schema\n- Deleted get-extension-import function (no longer needed)\n- Deleted import-store utility (temporary approach removed)\n\nFrontend changes:\n- Removed ExtensionImport page and /import/:id route\n- Extension uploads now use same flow as file uploads\n\nThis matches the correct user flow: user logs in to ATlast first, then\nextension creates permanent upload records directly (same as file uploads).\n\nBuilt extension successfully for dev environment.", 48 56 "files_changed": 12 49 57 }, 50 58 { 51 - "hash": "69db377f7f6dd4e38677f2507ad660cdf1a66465", 52 - "short_hash": "69db377", 59 + "hash": "d0bcf337b6d223a86443f6f67767e87b74e4dd7d", 60 + "short_hash": "d0bcf33", 53 61 "author": "Ariel M. Lighty", 54 - "date": "2025-12-25T22:00:53-05:00", 55 - "message": "update decision graph", 56 - "files_changed": 2 62 + "date": "2025-12-26T00:26:09-05:00", 63 + "message": "refactor extension to require authentication and use proper upload flow\n\nRemoved temporary storage approach and implemented proper authentication flow:\n\nExtension changes:\n- Added session check to popup init flow (checkSession in api-client)\n- Added \"not logged in\" state with login prompts\n- Updated uploadToATlast to include credentials for cookie-based auth\n- Extension now requires user to be logged in BEFORE scanning\n\nBackend changes:\n- Converted extension-import to AuthenticatedHandler (requires auth)\n- Now creates upload records immediately (no temporary storage)\n- Removed extension_imports table from database schema\n- Deleted get-extension-import function (no longer needed)\n- Deleted import-store utility (temporary approach removed)\n\nFrontend changes:\n- Removed ExtensionImport page and /import/:id route\n- Extension uploads now use same flow as file uploads\n\nThis matches the correct user flow: user logs in to ATlast first, then\nextension creates permanent upload records directly (same as file uploads).\n\nBuilt extension successfully for dev environment.", 64 + "files_changed": 12 57 65 }, 58 66 { 59 67 "hash": "c35fb0d83202607facc203dfe10325e8672ea67e", ··· 72 80 "files_changed": 3 73 81 }, 74 82 { 75 - "hash": "32cdee3aeac7ef986df47e0fff786b5f7471e55b", 76 - "short_hash": "32cdee3", 83 + "hash": "ba29fd68872913ba0a587aa7f29f97b3d373a732", 84 + "short_hash": "ba29fd6", 77 85 "author": "Ariel M. Lighty", 78 86 "date": "2025-12-25T13:22:32-05:00", 79 87 "message": "configure Netlify dev for monorepo with --filter flag\n\nFixed Netlify CLI monorepo detection issue by using --filter flag:\n- Updated root package.json scripts to use 'npx netlify-cli dev --filter @atlast/web'\n- Updated netlify.toml [dev] section to use npm with --prefix for framework command\n- Added monorepo development instructions to CLAUDE.md\n- Documented Windows Git Bash compatibility issue with netlify command\n\nSolution: Use 'npx netlify-cli dev --filter @atlast/web' to bypass monorepo\nproject selection prompt and specify which workspace package to run.\n\nDev server now runs successfully at http://localhost:8888 with all backend\nfunctions loaded.", 80 - "files_changed": 4 88 + "files_changed": 5 81 89 }, 82 90 { 83 - "hash": "ba29fd68872913ba0a587aa7f29f97b3d373a732", 84 - "short_hash": "ba29fd6", 91 + "hash": "32cdee3aeac7ef986df47e0fff786b5f7471e55b", 92 + "short_hash": "32cdee3", 85 93 "author": "Ariel M. Lighty", 86 94 "date": "2025-12-25T13:22:32-05:00", 87 95 "message": "configure Netlify dev for monorepo with --filter flag\n\nFixed Netlify CLI monorepo detection issue by using --filter flag:\n- Updated root package.json scripts to use 'npx netlify-cli dev --filter @atlast/web'\n- Updated netlify.toml [dev] section to use npm with --prefix for framework command\n- Added monorepo development instructions to CLAUDE.md\n- Documented Windows Git Bash compatibility issue with netlify command\n\nSolution: Use 'npx netlify-cli dev --filter @atlast/web' to bypass monorepo\nproject selection prompt and specify which workspace package to run.\n\nDev server now runs successfully at http://localhost:8888 with all backend\nfunctions loaded.", 88 - "files_changed": 5 96 + "files_changed": 4 89 97 }, 90 98 { 91 99 "hash": "c3e7afad396d130791d801a85cbfc9643bcd6309",
+99
docs/graph-data.json
··· 3299 3299 "created_at": "2025-12-26T13:45:58.309042200-05:00", 3300 3300 "updated_at": "2025-12-26T13:45:58.309042200-05:00", 3301 3301 "metadata_json": "{\"branch\":\"master\",\"confidence\":95}" 3302 + }, 3303 + { 3304 + "id": 301, 3305 + "change_id": "b3f870cc-406f-4cf7-8ab4-04d9f76fb2ab", 3306 + "node_type": "outcome", 3307 + "title": "Committed fixes for bulkCreate and uploadId handling", 3308 + "description": null, 3309 + "status": "pending", 3310 + "created_at": "2025-12-26T13:47:48.770693200-05:00", 3311 + "updated_at": "2025-12-26T13:47:48.770693200-05:00", 3312 + "metadata_json": "{\"branch\":\"master\",\"commit\":\"581ed00\",\"confidence\":95}" 3313 + }, 3314 + { 3315 + "id": 302, 3316 + "change_id": "e2cf6ed0-c80f-420a-bdd2-98369f58de2a", 3317 + "node_type": "observation", 3318 + "title": "Frontend error: loadUploadResults not defined - need to check function scope", 3319 + "description": null, 3320 + "status": "pending", 3321 + "created_at": "2025-12-26T13:50:59.977950500-05:00", 3322 + "updated_at": "2025-12-26T13:50:59.977950500-05:00", 3323 + "metadata_json": "{\"branch\":\"master\",\"confidence\":90}" 3324 + }, 3325 + { 3326 + "id": 303, 3327 + "change_id": "7a7a19a6-4abf-4c30-9072-14beaa12b106", 3328 + "node_type": "action", 3329 + "title": "Fix useEffect to call handleLoadUpload instead of non-existent loadUploadResults", 3330 + "description": null, 3331 + "status": "pending", 3332 + "created_at": "2025-12-26T13:51:36.007564400-05:00", 3333 + "updated_at": "2025-12-26T13:51:36.007564400-05:00", 3334 + "metadata_json": "{\"branch\":\"master\",\"confidence\":90}" 3335 + }, 3336 + { 3337 + "id": 304, 3338 + "change_id": "dff4aef7-8732-4aae-a6be-f44fb42b4941", 3339 + "node_type": "outcome", 3340 + "title": "Fixed function name - now calls handleLoadUpload correctly", 3341 + "description": null, 3342 + "status": "pending", 3343 + "created_at": "2025-12-26T13:51:52.256909300-05:00", 3344 + "updated_at": "2025-12-26T13:51:52.256909300-05:00", 3345 + "metadata_json": "{\"branch\":\"master\",\"confidence\":95}" 3302 3346 } 3303 3347 ], 3304 3348 "edges": [ ··· 6469 6513 "weight": 1.0, 6470 6514 "rationale": "Implementation complete", 6471 6515 "created_at": "2025-12-26T13:46:00.313229300-05:00" 6516 + }, 6517 + { 6518 + "id": 289, 6519 + "from_node_id": 300, 6520 + "to_node_id": 301, 6521 + "from_change_id": "876412ec-a214-4bf7-b48a-b7706c698085", 6522 + "to_change_id": "b3f870cc-406f-4cf7-8ab4-04d9f76fb2ab", 6523 + "edge_type": "leads_to", 6524 + "weight": 1.0, 6525 + "rationale": "Committed to repository", 6526 + "created_at": "2025-12-26T13:47:50.881789900-05:00" 6527 + }, 6528 + { 6529 + "id": 290, 6530 + "from_node_id": 297, 6531 + "to_node_id": 301, 6532 + "from_change_id": "74ea361f-577c-4058-b833-6666e777ee00", 6533 + "to_change_id": "b3f870cc-406f-4cf7-8ab4-04d9f76fb2ab", 6534 + "edge_type": "leads_to", 6535 + "weight": 1.0, 6536 + "rationale": "Goal achieved", 6537 + "created_at": "2025-12-26T13:47:52.948372300-05:00" 6538 + }, 6539 + { 6540 + "id": 291, 6541 + "from_node_id": 301, 6542 + "to_node_id": 302, 6543 + "from_change_id": "b3f870cc-406f-4cf7-8ab4-04d9f76fb2ab", 6544 + "to_change_id": "e2cf6ed0-c80f-420a-bdd2-98369f58de2a", 6545 + "edge_type": "leads_to", 6546 + "weight": 1.0, 6547 + "rationale": "New error found in testing", 6548 + "created_at": "2025-12-26T13:51:02.588994500-05:00" 6549 + }, 6550 + { 6551 + "id": 292, 6552 + "from_node_id": 302, 6553 + "to_node_id": 303, 6554 + "from_change_id": "e2cf6ed0-c80f-420a-bdd2-98369f58de2a", 6555 + "to_change_id": "7a7a19a6-4abf-4c30-9072-14beaa12b106", 6556 + "edge_type": "leads_to", 6557 + "weight": 1.0, 6558 + "rationale": "Fix identified", 6559 + "created_at": "2025-12-26T13:51:38.127298700-05:00" 6560 + }, 6561 + { 6562 + "id": 293, 6563 + "from_node_id": 303, 6564 + "to_node_id": 304, 6565 + "from_change_id": "7a7a19a6-4abf-4c30-9072-14beaa12b106", 6566 + "to_change_id": "dff4aef7-8732-4aae-a6be-f44fb42b4941", 6567 + "edge_type": "leads_to", 6568 + "weight": 1.0, 6569 + "rationale": "Implementation complete", 6570 + "created_at": "2025-12-26T13:51:54.561857100-05:00" 6472 6571 } 6473 6572 ] 6474 6573 }
+2 -2
packages/web/src/App.tsx
··· 336 336 } 337 337 338 338 // Load results for this upload 339 - loadUploadResults(uploadId); 339 + handleLoadUpload(uploadId); 340 340 341 341 // Clean up URL parameter after loading 342 342 const newUrl = new URL(window.location.href); 343 343 newUrl.searchParams.delete('uploadId'); 344 344 window.history.replaceState({}, '', newUrl); 345 - }, [session, loadUploadResults]); 345 + }, [session, handleLoadUpload]); 346 346 347 347 return ( 348 348 <ErrorBoundary>