Implement UUID-based tracking for OBS groups to handle renames
Some checks failed
Lint and Build / build (pull_request) Failing after 1m43s
Some checks failed
Lint and Build / build (pull_request) Failing after 1m43s
- Add group_uuid column to teams table for reliable OBS scene tracking - Update createGroup API to store OBS scene UUID when creating groups - Enhance verifyGroups API with UUID-first matching and name fallback - Add comprehensive verification system to detect sync issues between database and OBS - Implement UI indicators for UUID linking, name mismatches, and invalid groups - Add "Clear Invalid" and "Update Name" actions for fixing synchronization problems - Create migration script for existing databases to add UUID column - Update Team type definition to include optional group_uuid field This resolves issues where manually renaming groups in OBS would break the synchronization between the database and OBS, providing a more robust group management system. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
92c05303bd
commit
cb1dd60bb8
9 changed files with 351 additions and 34 deletions
|
@ -45,7 +45,7 @@ function validateTeamInput(data: unknown): {
|
|||
export const GET = withErrorHandling(async () => {
|
||||
try {
|
||||
const db = await getDatabase();
|
||||
const teams: Team[] = await db.all(`SELECT team_id, team_name, group_name FROM ${TABLE_NAMES.TEAMS} ORDER BY team_name ASC`);
|
||||
const teams: Team[] = await db.all(`SELECT team_id, team_name, group_name, group_uuid FROM ${TABLE_NAMES.TEAMS} ORDER BY team_name ASC`);
|
||||
|
||||
return createSuccessResponse(teams);
|
||||
} catch (error) {
|
||||
|
@ -86,7 +86,8 @@ export const POST = withErrorHandling(async (request: Request) => {
|
|||
const newTeam: Team = {
|
||||
team_id: result.lastID!,
|
||||
team_name: team_name,
|
||||
group_name: null
|
||||
group_name: null,
|
||||
group_uuid: null
|
||||
};
|
||||
|
||||
return createSuccessResponse(newTeam, 201);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue