feat: add webhook support for generation completion events#213
Conversation
❌ Deploy Preview for arcmind-ai failed.
|
|
@SATYAM-PRATIBHAN Sir, I have finally completed the feature. It took me 2 days to finish as I also had an exam during that time. Please review my PR when you get time and let me know if any changes or improvements are required. I’ve tested the full flow including backend, frontend, and documentation. If possible, I would be grateful if this PR could be considered under level:critical since it includes a full-stack feature implementation with backend, frontend, and documentation changes. Thanks! |
|
Also Sir, I want to inform you before hand only that the frontend is in |
|
Hey @Abfa41, kindly solve the CI checks!! |
|
@SATYAM-PRATIBHAN Sir, I checked the failing CI/type-check issue. The failure is currently caused by existing unused The TypeScript error is:
This happens when a suppression comment exists but the actual TypeScript error no longer exists anymore, so CI fails during strict type checking. Since most of these files are unrelated to the webhook feature/issue, I wanted to confirm first whether you would prefer handling this cleanup separately, or should I remove/fix all these unused directives within this PR itself so the CI passes, even though it would include unrelated project-wide changes outside the webhook issue scope. If you want, we can also ignore this for this PR and handle it later separately. |
@SATYAM-PRATIBHAN Sir, Please let me know as early as possible.. |
|
So @Abfa41, it's actually because of the file you added, i.e., types/next.auth.d.ts, so maybe first delete that file and run this command in your local setup: pnpm tsc --noEmit. Then maybe some errors might still come for your new files like the webhook route, so add those comments there too, and the same for any route for which you remove that comment. As per your PR, it was generate/route. ts and generate-github-design/route. ts, makes sense? |
Absolutely @SATYAM-PRATIBHAN Sir 👍 |
All the errors have been solved, the CI/type check has been completed, and all the checks are now passing ✅ Thanks for pinpointing the exact root cause sir. Initially, I thought those unused I fixed all the required files and revised the code again as well Sir. Got to learn something new today 😄 |
| ); | ||
|
|
||
| // Send webhook notification for failed generation | ||
| if (userId) { |
There was a problem hiding this comment.
so it seems you never implemented webhook for successful generations
There was a problem hiding this comment.
My Bad Sir 😅, like during testing and all I kept the success webhook, but during changes and refactors in production, I might have removed that code by mistake. Thanks for pointing it out Sir 👍. I have fixed it by adding the Webhook for successful generations.
|
|
||
| // @ts-expect-error id is added to session in session callback | ||
| // @ts-expect-error custom session user id | ||
| const userId = session?.user?.id; |
There was a problem hiding this comment.
you defined it as module level so why here too...maybe just remove the module one and refactor the code once by adding it too post route itself but not in the try catch, hope i am sounding right.
There was a problem hiding this comment.
You are correct. like it will cause redundancy to the userId, I did not note that. Now, I have changed it by adding directly into post rather that module one, as u suggested Sir. Thanks for pointing this out too 👍.
|
@SATYAM-PRATIBHAN Sir, For me in my laptop, It was coming fine and I rather focussed more on backend rather than frontend in this issue ( because most of components were already built ). After you reported this alignment issue, I too started checking its responsiveness. It was going off in medium screens. The main problem was that I was using double centering system, like I was using container for outside div and flex properties for inner div, causing problems and shifting towards left. I just removed container class from outside div and made extra sure for no more alignment issues. Really got to learn something new over here as well.. |
|
@SATYAM-PRATIBHAN Sir, All fixes and errors which you have pointed out have been solved. If you find any more errors or want me to change anything, please do let me know Sir. |
fix: webhook for third party providers
af4987f
into
SATYAM-PRATIBHAN:main
|
@SATYAM-PRATIBHAN Sir, thanks for merging the PR. If possible, I would be grateful if this PR could be considered under level:critical since it includes a full-stack feature implementation with backend, frontend, and documentation changes. Also Sir, I have a small request. Could you please assign any one of these #154, #156, #131, #113 as they are mostly still open only?? I have already commented on them. |




Description
This PR adds webhook support to notify users when a system design generation completes (success or failure).
Previously, users had to wait for generation results inside the application. Now, external systems can receive real-time HTTP callbacks when a generation finishes, enabling integrations like automation tools, bots, and CI pipelines.
Type of Change
Related Issues
Closes #108
Features / Completed all Requirements
Screenshots ( Backend )
Screenshots ( Frontend ):
Checklist
Additional Notes