mirror of
https://github.com/eyaltoledano/claude-task-master.git
synced 2026-01-30 06:12:05 +00:00
fix: fix team invite flow
This commit is contained in:
@@ -927,6 +927,11 @@ export class ExportCommand extends Command {
|
||||
case 'already_member':
|
||||
console.log(chalk.gray(` ${inv.email}: Already a team member`));
|
||||
break;
|
||||
case 'already_invited':
|
||||
console.log(
|
||||
chalk.yellow(` ${inv.email}: Already invited (pending)`)
|
||||
);
|
||||
break;
|
||||
case 'error':
|
||||
case 'failed':
|
||||
console.log(
|
||||
|
||||
@@ -72,9 +72,19 @@ vi.mock('../services/session-manager.js', () => {
|
||||
|
||||
// Mock SupabaseAuthClient to avoid side effects
|
||||
vi.mock('../../integration/clients/supabase-client.js', () => {
|
||||
let instance: any = null;
|
||||
return {
|
||||
SupabaseAuthClient: class {
|
||||
constructor() {}
|
||||
static getInstance() {
|
||||
if (!instance) {
|
||||
instance = new (this as any)();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
static resetInstance() {
|
||||
instance = null;
|
||||
}
|
||||
refreshSession() {
|
||||
return Promise.resolve({});
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ export interface GenerateBriefOptions {
|
||||
*/
|
||||
export interface InvitationResult {
|
||||
email: string;
|
||||
status: 'sent' | 'already_member' | 'error' | 'failed';
|
||||
status: 'sent' | 'already_member' | 'already_invited' | 'error' | 'failed';
|
||||
error?: string;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ export interface SendTeamInvitationsResponse {
|
||||
success: boolean;
|
||||
invitations: Array<{
|
||||
email: string;
|
||||
status: 'sent' | 'already_member' | 'failed';
|
||||
status: 'sent' | 'already_member' | 'already_invited' | 'failed';
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ export interface SendTeamInvitationsResult {
|
||||
success: boolean;
|
||||
invitations?: Array<{
|
||||
email: string;
|
||||
status: 'sent' | 'already_member' | 'failed';
|
||||
status: 'sent' | 'already_member' | 'already_invited' | 'failed';
|
||||
}>;
|
||||
error?: {
|
||||
code: string;
|
||||
|
||||
@@ -493,6 +493,8 @@ async function handleParsePrdToHamster(prdPath) {
|
||||
);
|
||||
} else if (inv.status === 'failed') {
|
||||
console.log(chalk.red(` ${inv.email}: Failed to send`));
|
||||
} else if (inv.status === 'already_invited') {
|
||||
console.log(chalk.gray(` ${inv.email}: Already invited`));
|
||||
}
|
||||
}
|
||||
console.log('');
|
||||
|
||||
Reference in New Issue
Block a user