From 7fd381a242f68b7c6f10db4e3ae0bb3d06e36a16 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 22 Jan 2026 10:09:07 -1000 Subject: 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 --- issues/007-fix-outdated-todoist-link.md | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 issues/007-fix-outdated-todoist-link.md (limited to 'issues/007-fix-outdated-todoist-link.md') 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 -- cgit v1.2.3