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

fix extension-import: add missing matchedUsers parameter to createUpload

The createUpload method expects 5 parameters but we were only passing 4,
causing NaN to be inserted for unmatched_users calculation. Now passing 0
for matchedUsers (will be updated after search is performed).

byarielm.fyi a8a4b0a8 b00ecad7

verified
Changed files
+44 -13
docs
packages
functions
+20 -12
docs/git-history.json
··· 1 1 [ 2 2 { 3 - "hash": "d0bcf337b6d223a86443f6f67767e87b74e4dd7d", 4 - "short_hash": "d0bcf33", 3 + "hash": "1a355fe785eb1768dba3f4c3a8ba631904d1d6d6", 4 + "short_hash": "1a355fe", 5 + "author": "Ariel M. Lighty", 6 + "date": "2025-12-26T00:33:21-05:00", 7 + "message": "fix extension-import: add missing matchedUsers parameter to createUpload\n\nThe createUpload method expects 5 parameters but we were only passing 4,\ncausing NaN to be inserted for unmatched_users calculation. Now passing 0\nfor matchedUsers (will be updated after search is performed).", 8 + "files_changed": 1 9 + }, 10 + { 11 + "hash": "b00ecad7a2c576962cb78de5b50f301e4664830e", 12 + "short_hash": "b00ecad", 5 13 "author": "Ariel M. Lighty", 6 14 "date": "2025-12-26T00:26:09-05:00", 7 15 "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.", 8 16 "files_changed": 12 9 17 }, 10 18 { 11 - "hash": "69db377f7f6dd4e38677f2507ad660cdf1a66465", 12 - "short_hash": "69db377", 19 + "hash": "d0bcf337b6d223a86443f6f67767e87b74e4dd7d", 20 + "short_hash": "d0bcf33", 13 21 "author": "Ariel M. Lighty", 14 - "date": "2025-12-25T22:00:53-05:00", 15 - "message": "update decision graph", 16 - "files_changed": 2 22 + "date": "2025-12-26T00:26:09-05:00", 23 + "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.", 24 + "files_changed": 12 17 25 }, 18 26 { 19 - "hash": "917687b455a241413e60086b751902156352e098", 20 - "short_hash": "917687b", 27 + "hash": "90067b8feb9f40512b9732a05b1a8756f338a481", 28 + "short_hash": "90067b8", 21 29 "author": "Ariel M. Lighty", 22 - "date": "2025-12-25T20:59:22-05:00", 23 - "message": "update decision graph", 24 - "files_changed": 2 30 + "date": "2025-12-25T21:43:51-05:00", 31 + "message": "add dev server health check and offline detection to extension\n\nFeatures:\n- Check server health on popup init (dev mode only)\n- Show 'server offline' state with setup instructions\n- 'Check Again' button to retry connection\n- Display target server URL for debugging\n- 3-second timeout for health checks\n\nFixes port 8888 conflict workflow - extension now prompts user\nto start dev server instead of hanging silently.", 32 + "files_changed": 4 25 33 }, 26 34 { 27 35 "hash": "c35fb0d83202607facc203dfe10325e8672ea67e",
+22
docs/graph-data.json
··· 3145 3145 "created_at": "2025-12-26T00:26:17.378515100-05:00", 3146 3146 "updated_at": "2025-12-26T00:26:17.378515100-05:00", 3147 3147 "metadata_json": "{\"branch\":\"master\",\"commit\":\"d0bcf33\",\"confidence\":100}" 3148 + }, 3149 + { 3150 + "id": 287, 3151 + "change_id": "e01c6989-6c0b-42f8-b7c7-60aca059f7c3", 3152 + "node_type": "action", 3153 + "title": "Fixed NaN database error in extension-import", 3154 + "description": null, 3155 + "status": "pending", 3156 + "created_at": "2025-12-26T00:33:28.860934100-05:00", 3157 + "updated_at": "2025-12-26T00:33:28.860934100-05:00", 3158 + "metadata_json": "{\"branch\":\"master\",\"commit\":\"1a355fe\",\"confidence\":95,\"files\":[\"packages/functions/src/extension-import.ts\"]}" 3148 3159 } 3149 3160 ], 3150 3161 "edges": [ ··· 6161 6172 "weight": 1.0, 6162 6173 "rationale": "Committed after successful build", 6163 6174 "created_at": "2025-12-26T00:26:22.985765600-05:00" 6175 + }, 6176 + { 6177 + "id": 275, 6178 + "from_node_id": 286, 6179 + "to_node_id": 287, 6180 + "from_change_id": "60c9ec75-7e3f-4aa4-b8cf-0691ef92d260", 6181 + "to_change_id": "e01c6989-6c0b-42f8-b7c7-60aca059f7c3", 6182 + "edge_type": "leads_to", 6183 + "weight": 1.0, 6184 + "rationale": "Found and fixed bug during testing", 6185 + "created_at": "2025-12-26T00:33:34.834072700-05:00" 6164 6186 } 6165 6187 ] 6166 6188 }
+2 -1
packages/functions/src/extension-import.ts
··· 54 54 uploadId, 55 55 context.did, 56 56 validatedData.platform, 57 - validatedData.usernames.length 57 + validatedData.usernames.length, 58 + 0 // matchedUsers - will be updated after search 58 59 ); 59 60 60 61 console.log(`[extension-import] Created upload ${uploadId} for user ${context.did}`);