diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-22 10:09:07 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-22 10:09:07 -1000 |
| commit | 7fd381a242f68b7c6f10db4e3ae0bb3d06e36a16 (patch) | |
| tree | abff0af0a0f3b057d7b1ad6d95dbefdf30c553c3 /issues/007-fix-outdated-todoist-link.md | |
| parent | 583f90c5dedf0235fa45557359b0e6e7dd62b0f0 (diff) | |
Fix background image CORS issue
Switch from Unsplash Source API to Lorem Picsum which has proper
CORS headers for cross-origin image loading.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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 |
