Bug: Dashboard Quick Actions don't prefill type/occasion on /log #161
Labels
No labels
blocked:depends-p1
blocked:gate-research
blocked:lint-failed
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
data-loss
documentation
enhancement
feature-request
in-progress
needs-decompose
needs-triage
pwa
quickfix
security
security/high
security/medium
test
test-coverage
triage-approved
vault
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_kin_app_sync#161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
Clicking any of the six Quick Action buttons on the Dashboard (Quick Call, Send Text, Plan Meetup, Gift Idea, Add Note) lands on the LogInteraction page with no prefill — the page stays on step 1 ("Who did you connect with?") and the type/occasion query params are silently dropped.
Quick Log (no params) works because it has nothing to lose.
Repro
#/log, page shows step 1 "Who did you connect with?", no type=Call appliedExpected: lands on step 3 (Details) with type=Call pre-selected.
Root cause
src/pages/Home.tsx:101-110navigates with a query string:The browser stores the query inside the URL hash (
#/log?type=Call), not in the URL search string.src/pages/LogInteraction.tsx:284reads it via:But under HashRouter,
location.searchis always""- the?type=Calllives insidelocation.hash.params.get("type")returnsnull, the prefill branch never fires, the page stays on step 1.Suggested fix
Either:
useSearchParams()hook (which reads from inside the hash correctly under HashRouter), ORURLSearchParams(location.search)withURLSearchParams(location.hash.split("?")[1] || "")Severity
Functional. The six Quick Actions on the dashboard are silent no-ops - they navigate but don't prefill. This is the historic #147 shape and looks like a regression or one that was never fully fixed for the param case.
Verification
npm run dev(port 3000)history.replaceState(null,'','#/log?type=Call')produceslocation.hash = "#/log?type=Call",location.search = "", and LogInteraction stays on step 1.Fixed by kilo-gsd.py in commit
6d4699c(was 1c91a2f before rebase to resolve origin/main divergence).Bug: HashRouter stores
?type=Callinsidelocation.hash, notlocation.search.URLSearchParams(location.search)was always empty, so the prefill silently dropped and /log stayed on step 1.Fix: swap to react-router's
useSearchParams(), which reads the hash-stored query under both HashRouter and MemoryRouter. Updated re-run deps; location.state and location.pathname unchanged.Verification: new regression test mounts LogInteraction under HashRouter with ?type=Call, ?type=Other&occasion=Gift, and a non-canonical type guard (src/pages/tests/LogInteraction.queryPrefill.test.tsx). Full
npm run test:unit+ lint + tsc clean. Pushed to main.Watcher recovery: kilo-gsd.py exited 2 (PARTIAL) because origin/main had moved between run start and push. Watcher did fetch+rebase+push, landed on main as
6d4699calongside sibling #162's946ae4b.