-
Notifications
You must be signed in to change notification settings - Fork 5
feat: rename workspace #163
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
Conversation
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.
Great job!
The only thing I'm slightly missing is a test that actually tests the process of renaming using an MSW handler for the relevant endpoint as well.
But there is no reason to block a release because of that at all
const handleSubmit = (e: FormEvent<HTMLFormElement>) => { | ||
e.preventDefault(); | ||
mutate({ body: { name: workspaceName, rename_to: name } }); | ||
}; | ||
|
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.
There is a hook in the system prompt editor useSavedStatus
codegate-ui/src/features/workspace-system-prompt/components/system-prompt-editor.tsx
Lines 57 to 66 in 1d80c9f
function useSavedStatus() { | |
const [saved, setSaved] = useState<boolean>(false); | |
useEffect(() => { | |
const id = setTimeout(() => setSaved(false), 2000); | |
return () => clearTimeout(id); | |
}, [saved]); | |
return { saved, setSaved }; | |
} |
We could re-use it here to show a pending+confirmation state
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.
mm I saw it, honestly I don't see the value 🤔
I mean we have isPending and the onSuccess callback for notification, why we need this hook?
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.
Just to provide visual feedback that it has been saved — also for consistency.
Feel free to merge without this — I would like to go back and standardise it - but it's deffo not a blocker.
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.
I mean, I would prefer to show a notification after a mutation, I would standardise the notification approach after a mutation...wdyt?
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.
That's a valid option too
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.
Let's merge as is and standardise on something in next iteration?
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.
makes sense 👍
yep, let me add it in a next PR, avoid block the release if it makes sense to you |
exactly, that is what I'm thinking |
Pull Request Test Coverage Report for Build 12905363452Details
💛 - Coveralls |
Kapture.2025-01-22.at.10.27.10.mp4