Skip to content

Conversation

@theisoj
Copy link

@theisoj theisoj commented Dec 23, 2025

Cursor support added for Testaustime extension. I made this modification because VS Code is not the only code editor in the market. There's is plenty of them out there. Nothing else to add here.

@vercel
Copy link

vercel bot commented Dec 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
testaustime Error Error Dec 26, 2025 5:36pm
testaustime-storybook Ready Ready Preview, Comment Dec 26, 2025 5:36pm

@theisoj
Copy link
Author

theisoj commented Dec 23, 2025

Cursor extension in this repo:
https://github.com/theisoj/testaustime-cursor

Please clone it from my repo and make it available.

const loginUrl =
editor == "vscode"
? `/login?redirect=${encodeURIComponent("/authorize?editor=vscode")}`
: editor == ""
Copy link
Member

Choose a reason for hiding this comment

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

Should it be cursor instead?

Suggested change
: editor == ""
: editor == "cursor"

Copy link
Member

Choose a reason for hiding this comment

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

Also could use something like this so it's easier to extend in the future

const loginUrls = new Map(Object.entries({
  vscode: `/login?redirect=${encodeURIComponent("/authorize?editor=vscode")}`,
  cursor: `/login?redirect=${encodeURIComponent("/authorize?editor=cursor")}`
}))
const loginUrl = loginUrls.get(editor)

if (loginUrl === undefined) {
  // Make this prettier
  return <div>Unsupported editor</div>
}

Copy link
Author

Choose a reason for hiding this comment

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

it would be better in my opinion.

<ExtensionBlock
logo="/images/cursor.svg"
alt="Cursor logo"
downloadLink="https://marketplace.visualstudio.com/items?itemName=testausserveri-ry.testaustime"
Copy link
Member

Choose a reason for hiding this comment

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

This is the VS Code extension

logo="/images/cursor.svg"
alt="Cursor logo"
downloadLink="https://marketplace.visualstudio.com/items?itemName=testausserveri-ry.testaustime"
sourceCodeLink="https://github.com/Testausserveri/testaustime-cursor"
Copy link
Member

Choose a reason for hiding this comment

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

Is the repo in process of being moved under Testaustime (or at least Testausserveri) organization? At least I didn't see any messages in Discord about that

Copy link
Author

Choose a reason for hiding this comment

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

yes. we'll talk about that in discord.


const { username } = me;

const editorName = editor == "vscode" ? "Visual Studio Code" : "Cursor";
Copy link
Member

Choose a reason for hiding this comment

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

Similar change here as I commented above

Copy link
Author

Choose a reason for hiding this comment

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

yeah. that wasn't better thing, but I did that anyway.

href={`vscode://testausserveri-ry.testaustime/authorize?token=${token}`}
href={
editor == "vscode"
? `vscode://testausserveri-ry.testaustime/authorize?token=${token}`
Copy link
Member

Choose a reason for hiding this comment

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

And here too

<Button
component="a"
href={`vscode://testausserveri-ry.testaustime/authorize?token=${token}`}
href={loginUrl}
Copy link
Member

Choose a reason for hiding this comment

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

This is not correct, loginUrl is a path in the frontend, not a path in the extension. You need to create a new map for the extension urls too.


if (loginUrl === undefined) {
// Make this prettier
return <div>Unsupported editor</div>;
Copy link
Member

Choose a reason for hiding this comment

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

Add translation

const editorName = editorNames.get(editor ?? "vscode");

if (editorName === undefined) {
return <div>Invalid editor</div>;
Copy link
Member

Choose a reason for hiding this comment

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

This should be the same text as above, with translation

Copy link
Author

Choose a reason for hiding this comment

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

ok. it should be fixed now.

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