Skip to content

Feature/authentication/phase2 - #66

Merged
ieliofficial merged 2 commits into
mainfrom
feature/authentication/phase2
Jul 16, 2026
Merged

ieliofficial merged 2 commits into
mainfrom
feature/authentication/phase2

Conversation

@DevOlabode

@DevOlabode DevOlabode commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

Phase 2: Frontend — Auth + GitHub Connect
Provider-neutral API shape; GitHub picker wired, Google deferred to Phase 3.

@DevOlabode
DevOlabode force-pushed the feature/authentication/phase2 branch from 017f071 to b4b759c Compare July 10, 2026 17:48
@DevOlabode DevOlabode self-assigned this Jul 10, 2026
@DevOlabode
DevOlabode requested a review from ieliofficial July 10, 2026 21:59
@DevOlabode

Copy link
Copy Markdown
Member Author

Phase 2 complete

Implemented the frontend authentication flow, GitHub storage picker, storage validation/setup, real user state, logout flow, and replaced placeholder data with backend-powered APIs. Google support remains deferred to Phase 3.

@ieliofficial ieliofficial left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good progress here, especially the provider-neutral frontend flow and the added tests. I found three issues that need fixing before merge:

  1. Please verify the signed-in user can access the submitted repo, and that its GitHub node ID matches storageRef.id, before minting an installation token. Right now a user could submit another repo where the app is installed.
  2. Please make concurrent scan saves merge against current scan truth. Refreshing only the SHA can overwrite a newer index, and the three sequential writes can leave partial state. A two-writer test would help confirm the fix.
  3. Please open saved reports by scan ID from storage. The current dashboard click starts a fresh scan of the host, so it does not show the saved historical report.

The backend suite and frontend build pass. Once these data access and persistence issues are addressed, this will be in much better shape.

Wire GitHub connect/load/init, installation-token writes with repo access
checks, concurrent scan-save merge against storage truth, and open saved
reports by scan id from the dashboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
@DevOlabode
DevOlabode force-pushed the feature/authentication/phase2 branch from bc3ad18 to 0e52dc0 Compare July 13, 2026 19:55
@DevOlabode
DevOlabode requested a review from ieliofficial July 13, 2026 20:12
@ieliofficial

Copy link
Copy Markdown
Member

Good progress. The saved-report-by-id flow works, the repo access check is in, and the concurrent-save reconcile is a real step up.

Two things still block merge:

  1. The repo identity check can be skipped. In authService it's if (storageRef.id && data.node_id !== storageRef.id), so a request that leaves storageRef.id out never runs the comparison. Make the id required and check it every time.
  2. A scan can get duplicated on retry. _saveScanResultsOnce generates the scan id with randomUUID() inside the attempt, and saveScanResults re-runs that method on a conflict. So if the scan file writes but the index write conflicts, the retry mints a new id and writes a second file for the same scan. Generate the id and payload once, before the retry loop, and reuse them. Then add a test for that exact order: scan file succeeds, index write returns a conflict.

Also get lint green before the next push (set-state-in-effect in App.jsx, and the process global in vite.config.js). Ping me when those are done and I'll take another look.

@ieliofficial ieliofficial mentioned this pull request Jul 15, 2026
@DevOlabode
DevOlabode requested review from ieliofficial and removed request for ieliofficial July 15, 2026 21:01

@ieliofficial ieliofficial left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three issues are sorted. 🎉

@ieliofficial
ieliofficial merged commit 315adda into main Jul 16, 2026
@ieliofficial
ieliofficial deleted the feature/authentication/phase2 branch July 16, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants