diff options
Diffstat (limited to 'issues/007-fix-outdated-todoist-link.md')
| -rw-r--r-- | issues/007-fix-outdated-todoist-link.md | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/issues/007-fix-outdated-todoist-link.md b/issues/007-fix-outdated-todoist-link.md new file mode 100644 index 0000000..5d628f2 --- /dev/null +++ b/issues/007-fix-outdated-todoist-link.md @@ -0,0 +1,54 @@ +# [BUG] Fix outdated Todoist task link + +## Description +Fix outdated Todoist task link. + +## Technical Context +- Affects: `internal/api/todoist.go` (URL construction) or stored `url` field in DB +- Todoist may have changed their URL scheme +- Current URLs may be returning 404 or redirecting incorrectly + +## Test Strategy + +### Unit Test (Red) +**File:** `internal/api/todoist_test.go` + +```go +func TestBuildTaskURL(t *testing.T) { + taskID := "123456789" + url := BuildTaskURL(taskID) + + // Assert current Todoist URL format + // Option A: https://todoist.com/showTask?id=123456789 + // Option B: https://todoist.com/app/task/123456789 + assert.Equal(t, "https://todoist.com/app/task/123456789", url) +} +``` + +## Proposed Approach + +1. Research current Todoist web URL format: + - Check Todoist docs or inspect working links in browser + - Likely format: `https://todoist.com/app/task/{task_id}` or `https://todoist.com/showTask?id={task_id}` +2. Update URL builder in `internal/api/todoist.go` +3. Consider migration for existing cached URLs in database: + - Option A: Update on read (lazy migration) + - Option B: Run migration script to update all stored URLs +4. If URL comes from API response directly, verify we're using the correct field + +## Debugging Steps +1. Find a task ID in the database +2. Try current URL format in browser +3. Try alternative formats to find working one +4. Check Todoist API response for canonical URL field + +## Affected Components +- `internal/api/todoist.go` +- `internal/api/todoist_test.go` +- Potentially `internal/store/sqlite.go` (if migration needed) + +## Definition of Done +- [ ] Task links open correct Todoist page +- [ ] URL builder uses current format +- [ ] Existing cached URLs updated or migrated +- [ ] Unit test validates URL format |
