diff options
Diffstat (limited to 'DESIGN.md')
| -rw-r--r-- | DESIGN.md | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -546,6 +546,48 @@ func TestHandler_HandleDashboard(t *testing.T) { 7. **Don't refactor working code** - Only touch what's needed 8. **Don't alter git history** - Never amend, rebase, or force push. Keep a clean, linear history with new commits only. +### Feature Toggles + +Feature toggles allow gradual rollout of new features and easy rollback if issues arise. + +**When to use feature toggles:** +- New features that may need adjustment after deployment +- Experimental features being tested +- Features that depend on external services that may be unreliable +- Any change that could break existing functionality + +**Creating a feature toggle:** + +1. Add a migration or use the Settings UI at `/settings` +2. Check the toggle in your handler: +```go +if h.store.IsFeatureEnabled("my_feature") { + // New behavior +} else { + // Old behavior or disabled state +} +``` + +3. Document the toggle in this file under "Active Feature Toggles" + +**Managing feature toggles:** +- Access the Settings page at `/settings` to view/toggle/create features +- Store methods: `IsFeatureEnabled()`, `SetFeatureEnabled()`, `CreateFeatureToggle()` +- Toggles are stored in the `feature_toggles` table + +**Lifecycle:** +1. **Create** toggle (disabled by default) before deploying feature +2. **Enable** after deployment if tests pass +3. **Monitor** for issues +4. **Remove** toggle and conditional code once feature is stable (usually after 1-2 weeks) + +**Active Feature Toggles:** +| Name | Description | Status | +|------|-------------|--------| +| `source_config` | Configure which boards/lists/calendars to fetch | Disabled | +| `calendar_timeline` | Show timeline as a calendar view with time slots | Disabled | +| `completed_log` | Track and display completed tasks log | Enabled | + ### Git Practices **Clean history principles:** |
