Skip to content

feat: config schema cleanup, credentials overhaul, and tmux refactor#282

Merged
zbigniewsobiecki merged 1 commit intodevfrom
feat/config-schema-cleanup
Feb 16, 2026
Merged

feat: config schema cleanup, credentials overhaul, and tmux refactor#282
zbigniewsobiecki merged 1 commit intodevfrom
feat/config-schema-cleanup

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Config schema cleanup: Drop dead project_secrets table, restructure cascade_defaults PK (idorg_id), extract 15 Trello columns into project_integrations JSONB table, move agentConfigs to own schema file, standardize column/index naming (backendagent_backend, agent_backend_defaultagent_backend, idx_uq_ for unique indexes)
  • Credentials overhaul: Add organizations table, org-scoped credentials with per-project overrides via project_credential_overrides, per-agent credential overrides (agent_type scoping), update all GitHub triggers to use project-scoped credentials via provider
  • Tmux refactor: Split monolithic 1100-line tmux.ts into modular src/gadgets/tmux/ directory (TmuxControlClient, TmuxGadget, constants, errors, utils, etc.)
  • Repository deduplication: Consolidate three near-identical findProjectBy*FromDb functions into shared findProjectFromDb helper with Promise.all for 5 parallel sub-queries
  • Test coverage: New configRepository.test.ts (20 tests), expanded credentials and tmux test suites
  • Documentation: Updated CLAUDE.md schema section to reflect new table structure

Migrations

  • 0004_agent_credential_overrides.sql — organizations, credentials, project_credential_overrides, agent credential overrides
  • 0005_config_schema_cleanup.sql — drop project_secrets, restructure cascade_defaults PK, rename columns, create project_integrations, migrate Trello data to JSONB, drop flat Trello columns

Test plan

  • npm run typecheck passes
  • npm run lint passes (only pre-existing warning in manage-secrets.ts)
  • npm test — all 883 tests pass (57 files)
  • Lefthook pre-commit (lint + typecheck) and pre-push (test) hooks pass
  • CI passes on this branch
  • Apply migrations 0004 + 0005 to Supabase

🤖 Generated with Claude Code

- Drop dead project_secrets table and secretsRepository (migrated to credentials system)
- Restructure cascade_defaults PK: drop id column, make org_id the primary key
- Move agentConfigs to its own schema file (src/db/schema/agentConfigs.ts)
- Rename backend → agent_backend in agent_configs table
- Rename agent_backend_default → agent_backend in projects table
- Standardize index naming (idx_projects_repo → uq_projects_repo)
- Extract 15 Trello columns into project_integrations table with JSONB config
- Deduplicate configRepository find functions into shared findProjectFromDb helper
- Add organizations and org-scoped credentials with per-project overrides
- Add per-agent credential overrides (agent_type scoping)
- Refactor tmux gadget into modular structure (TmuxControlClient, TmuxGadget, etc.)
- Update GitHub triggers to use project-scoped credentials via provider
- Add configRepository test suite (20 tests) and expand credentials/tmux coverage
- Update CLAUDE.md documentation to reflect new schema

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 07ef206 into dev Feb 16, 2026
4 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the feat/config-schema-cleanup branch February 16, 2026 10:24
@zbigniewsobiecki zbigniewsobiecki mentioned this pull request Feb 16, 2026
2 tasks
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.

1 participant