Skip to content

Refactor Analysis#190

Open
itsmohmans wants to merge 28 commits into
developmentfrom
refactor/analysis-result
Open

Refactor Analysis#190
itsmohmans wants to merge 28 commits into
developmentfrom
refactor/analysis-result

Conversation

@itsmohmans

@itsmohmans itsmohmans commented Feb 28, 2026

Copy link
Copy Markdown
Member

This pull request introduces a significant refactor of the analysis workflow, moving from immediate analysis and result passing to a job-based system. Now, when a user submits text or a file for analysis, an analysis job is created and tracked by its ID. Subsequent result retrieval and downloads are performed using this job ID, for a scalable, paginated, and an async processing, along with a better UX for the user since the results page shows up immediately and shows the analysis processing as it progresses. The frontend and backend have been updated to support this new approach, with several new API endpoints and changes to data flow.

Backend: Job-based analysis and new endpoints

  • Introduced an AnalysisQueue system to manage analysis jobs, including creation, status tracking using Redis, result pagination, and background processing. New endpoints have been added for job creation, overview, results retrieval, and batch analysis (server/api/analyze/[id]/analyze.post.ts, server/api/analyze/[id]/overview.get.ts, server/api/analyze/[id]/results.get.ts).
  • Refactored analysis submission endpoints (comment.post.ts, file.post.ts) to create jobs instead of returning immediate results, and updated response formats to return job metadata (analysis ID, total comments) rather than analysis data.
  • Refactored Redis service into a unified utility to manage both magic link creation and analysis store (and anything that may use redis in the future)

Frontend: Data flow and download modal updates

  • Updated the frontend to use jobId for result retrieval and downloads, replacing direct use of analysis data. The DownloadModal.vue and Form.vue components now handle job IDs and route users to results pages with job IDs in query parameters.

Download/export endpoints: Job-based result fetching

  • Refactored CSV, JSON, and XLSX export endpoints to fetch results by job_id from the analysis queue, and updated export metadata to include job information and progress. Improved error handling and data formatting for these endpoints.

Other improvements

  • Added analysis progress indicators in the results page
  • Added share functionality to results page

Note: some of this PR description was generated by GitHub Copilot which I've proofread or edited.

@itsmohmans itsmohmans self-assigned this Feb 28, 2026
@thread-koder thread-koder force-pushed the development branch 3 times, most recently from 217aa72 to 76f1b90 Compare April 23, 2026 09:05
@thamudi thamudi removed the request for review from thread-koder July 1, 2026 13:55
@itsmohmans itsmohmans force-pushed the refactor/analysis-result branch from 827813d to ac16632 Compare July 2, 2026 14:54
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.

1 participant