fix: unique inspector ports,

remove temp invite UI, fix read-only race
This commit is contained in:
Arthur Belleville 2026-04-15 15:52:53 +02:00
parent e8044182d8
commit a42b79574f
No known key found for this signature in database
5 changed files with 6 additions and 82 deletions

View file

@ -5,10 +5,10 @@ import { defineConfig, type PluginOption } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig(({ mode }) => {
const plugins: PluginOption[] = [react(), tailwindcss(), tsconfigPaths()];
const plugins: PluginOption[] = [react(), tailwindcss(), tsconfigPaths({ ignoreConfigErrors: true })];
if (mode !== "test" && process.env.VITEST !== "true") {
plugins.push(cloudflare());
plugins.push(cloudflare({ inspectorPort: 9232 }));
}
return {

View file

@ -16,12 +16,12 @@ export default defineConfig(({ mode }) => {
react(),
// visualizer() as PluginOption,
tailwindcss(),
tsconfigPaths(),
tsconfigPaths({ ignoreConfigErrors: true }),
];
// Only include cloudflare plugin when not in test mode
if (mode !== "test" && process.env.VITEST !== "true") {
plugins.push(cloudflare());
plugins.push(cloudflare({ inspectorPort: 9231 }));
}
return {

View file

@ -971,82 +971,6 @@ export const TabloDetailsPage = () => {
</DialogHeader>
<div className="space-y-4">
{/* Invite Input */}
<div className="flex flex-col sm:flex-row gap-2">
<Input
type="email"
value={inviteEmail}
onChange={(e) => setInviteEmail(e.target.value)}
placeholder="Email de l'utilisateur"
className="flex-1 min-h-[44px]"
/>
{isInvitingUser ? (
<div className="flex justify-center items-center px-4">
<div className="animate-spin rounded-full h-4 w-4 border-b-2 border-primary" />
</div>
) : (
<Button
type="button"
onClick={handleSendInvite}
disabled={!isEmailValid(inviteEmail)}
>
Inviter
</Button>
)}
</div>
{/* Pending Invites */}
{pendingInvites && pendingInvites.length > 0 && (
<div>
<h4 className="text-sm font-semibold text-foreground mb-2">
Invitations en attente ({pendingInvites.length})
</h4>
<div className="space-y-2 max-h-32 overflow-y-auto">
{pendingInvites.map((invite) => (
<div
key={invite.id}
className="flex items-center space-x-2 p-2 bg-orange-50 dark:bg-orange-950/20 rounded-lg border border-dashed border-orange-200 dark:border-orange-900/50"
>
<div className="w-8 h-8 bg-orange-100 dark:bg-orange-900/30 rounded-full flex items-center justify-center text-orange-600 dark:text-orange-400 text-xs">
<svg
className="w-4 h-4"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
/>
</svg>
</div>
<div className="flex-1 min-w-0">
<span className="text-xs font-medium text-foreground truncate block">
{invite.invited_email}
</span>
</div>
<Button
size="sm"
variant="ghost"
onClick={() =>
cancelInvite({
tabloId: tabloId ?? "",
inviteId: invite.id,
})
}
disabled={isCancellingInvite || !tabloId}
title="Retirer l'invitation"
>
{isCancellingInvite ? "..." : "Retirer"}
</Button>
</div>
))}
</div>
</div>
)}
{/* Members List */}
{filteredMembers && filteredMembers.length > 0 && (
<div>

View file

@ -107,7 +107,7 @@ export const TabloPage = () => {
const user = useUser();
const { data: organizationData } = useOrganization();
const isReadOnly = isReadOnlyUser || !canCreateTablo;
const isReadOnly = isReadOnlyUser || canCreateTablo === false;
const getGreeting = () => {
const hour = new Date().getHours();

View file

@ -14,7 +14,7 @@ export default defineConfig(({ mode }) => {
react(),
visualizer() as PluginOption,
tailwindcss(),
tsconfigPaths(),
tsconfigPaths({ ignoreConfigErrors: true }),
];
plugins.push(