-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixing jwt signer regression #320
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✨ No issues found! Your code is sparkling clean! ✨ 🗒️ View all ignored comments in this repo
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to bd3fc2c in 1 minute and 15 seconds
More details
- Looked at
96
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. apps/web/app/dashboard/(authenticated)/connect/page.tsx:147
- Draft comment:
Consider that copying the URL to the clipboard before redirecting in main preview mode may be redundant, since the user never sees the copied content if they’re redirected immediately. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
The comment makes a valid point about efficiency - copying to clipboard right before a redirect is wasteful. However, this is a very minor optimization that doesn't affect functionality. The current code works fine either way. The suggestion also changes the behavior in a subtle way - currently the URL is always copied regardless of preview mode.
The current behavior of always copying might be intentional for consistency or for cases where the redirect fails. The optimization is so minor it may not be worth changing the code.
While the comment is technically correct, this kind of micro-optimization doesn't provide enough value to justify a code change and potential behavior change.
The comment should be removed as it suggests an unnecessary optimization that could subtly change behavior for minimal benefit.
2. packages/engine-backend/router/customerRouter.ts:200
- Draft comment:
Switching to an async mutation with await for token signing is good, but ensure that downstream code correctly handles async errors. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =20%
<= threshold50%
The comment is asking the author to ensure that downstream code handles async errors correctly. This falls under the rule of not asking the author to ensure behavior is intended or tested. The comment does not provide a specific suggestion or point out a specific issue, making it more of a general reminder.
3. packages/engine-backend/router/customerRouter.ts:201
- Draft comment:
Good use of 'await' with ctx.jwt.signViewer to fix the async JWT signing regression. Ensure that any dependencies relying on synchronous behavior are updated accordingly. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. apps/web/app/dashboard/(authenticated)/connect/page.tsx:72
- Draft comment:
Minor typographical issue: In the display name for the customer (line 72), there's an extra trailing space in 'Customer Display Name '. Consider removing the trailing space for consistency. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. packages/engine-backend/router/customerRouter.ts:24
- Draft comment:
Typographical error: In the comment on line 24, "we dont' need it" should be changed to "we don't need it". - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_SbDpBwn5ePTkeuFv
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -145,10 +145,10 @@ export default function MagicLinkPage() { | |||
onSubmit={({formData: values}) => { | |||
createMagicLink.mutate(values, { | |||
onSuccess: async (data) => { | |||
await copyToClipboard(data.url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider wrapping the call to copyToClipboard
in a try/catch
block to ensure that a clipboard failure doesn't prevent subsequent redirection and toast display. This is especially useful since in isMainPreview
mode, a failure here might block the intended redirection.
Important
Fixes JWT signing regression in
createMagicLink
mutation by addingasync
and adjusts clipboard behavior inMagicLinkPage
.createMagicLink
mutation incustomerRouter.ts
by addingasync
to ensure proper token generation.MagicLinkPage
inpage.tsx
to copy magic link to clipboard before redirecting ifisMainPreview
is true.customerRouter.ts
for better readability.This description was created by
for bd3fc2c. It will automatically update as commits are pushed.