8000 fix(jobpage): open editor button now reliably opens on first click by johannboehme · Pull Request #7 · johannboehme/tk-1 · GitHub
[go: up one dir, main page]

Skip to content

fix(jobpage): open editor button now reliably opens on first click - #7

Merged
johannboehme merged 1 commit into
mainfrom
claude/musing-cohen-6eaf51
May 1, 2026
Merged

johannboehme merged 1 commit into
mainfrom
claude/musing-cohen-6eaf51

Conversation

@johannboehme
Copy link
Copy Markdown
Owner

Summary

  • "Open editor" button on the job detail page only navigated when the user happened to click directly on the text — clicks on the padding silently did nothing, hence the "have to click 5 times" UX.
  • Root cause: a React Router <Link> was nested inside a <ChunkyButton> (which renders <motion.button>). The inline <a> only covered the text, the surrounding <button> had no onClick, and nesting <a> inside <button> is invalid HTML on top of that.
  • Fix: drop the nested <Link>, use => navigate(...)} on the button (useNavigate was already imported). Now the entire button area is the click target, matching the sibling "Quick render" / "Delete" buttons.

Test plan

  • npm --prefix frontend run dev, open a finished job at /job/:id
  • Click "Open editor" once on the padding (not on the letters) → editor opens immediately
  • Click on the text → editor opens immediately
  • Back, repeat several times → first click always works
  • "Quick render" and "Delete" buttons still work as before

🤖 Generated with Claude Code

The "Open editor" button wrapped a React Router <Link> inside a
<ChunkyButton> (which renders a <button>)
8B58
. The inline <a> only covered
the text, so clicks on the button's padding hit the <button> — which
had no onClick — and did nothing. Nesting <a> inside <button> is also
invalid HTML.

Replace with onClick + useNavigate (already imported), matching the
sibling buttons in the same row.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@johannboehme
johannboehme merged commit e79f506 into main May 1, 2026
1 check passed
@johannboehme
johannboehme deleted the claude/musing-cohen-6eaf51 branch May 1, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0