Skip to content

Fix: Remove element selector tooltip in Tweaks mode#697

Merged
mrcfps merged 4 commits intonexu-io:mainfrom
1119302165:fix-tooltip-overflow
May 6, 2026
Merged

Fix: Remove element selector tooltip in Tweaks mode#697
mrcfps merged 4 commits intonexu-io:mainfrom
1119302165:fix-tooltip-overflow

Conversation

@1119302165
Copy link
Copy Markdown
Contributor

@1119302165 1119302165 commented May 6, 2026

Fix: Remove element selector tooltip in Tweaks mode

Problem

When the "Tweaks" mode is enabled and users click on elements, a floating tooltip appeared displaying the CSS selector path. This tooltip was:

  • Visually obstructive, blocking the element being inspected
  • Prone to text overflow issues with long selector paths
  • Cluttering the preview area with redundant information
image

Solution

Removed the floating tooltip entirely. Users can now inspect elements without visual obstruction.

Changes

Files modified:

  • apps/web/src/components/FileViewer.tsx - Removed tooltip JSX rendering from CommentTargetOverlay component
  • apps/web/src/index.css - Removed .comment-target-tooltip and related CSS styles

Behavior Change

Aspect Before After
Element selection Shows blue overlay + floating tooltip Shows blue overlay only
Tooltip content CSS selector, dimensions, kind N/A
Visual obstruction Yes (tooltip blocks element) No
Long selector handling Text overflow issues N/A (tooltip removed)

after fix:
image

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6115e3afa1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/web/src/index.css Outdated
@lefarcen lefarcen added the bug-fix Fixes an existing bug label May 6, 2026
@lefarcen
Copy link
Copy Markdown
Contributor

lefarcen commented May 6, 2026

Hi @1119302165! 🎉

Thanks for the contribution — the detailed before/after analysis and screenshots are really helpful.

I will run a deep review and get back to you within 24h.

Thanks for making open-design better!
— open-design team

Copy link
Copy Markdown
Contributor

@lefarcen lefarcen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @1119302165! The fix addresses the immediate overflow issue well, and I appreciate the detailed before/after analysis. I found two suggestions for making the tooltip more robust across different screen sizes:

Summary:

  • ✅ Solves the long selector overflow problem
  • ⚠️ The fixed 280px width introduces responsive clipping risk
  • 💡 word-break: break-all can split selectors awkwardly

See inline comments for concrete suggestions.

Comment thread apps/web/src/index.css Outdated
Comment thread apps/web/src/index.css Outdated
@1119302165 1119302165 changed the title Fix: Tooltip overflow issue for element selector Fix: Remove element selector tooltip in Tweaks mode May 6, 2026
@lefarcen
Copy link
Copy Markdown
Contributor

lefarcen commented May 6, 2026

Hey @1119302165! I see your comment, but I'm not seeing any new commits yet — the current head is still 6115e3af (the original commit).

Your comment mentions "Removed the floating tooltip entirely," but the current diff still shows the tooltip with the fixed 280px width + word-break changes.

If you're planning to push a new approach:
Push your commits first, then I'll automatically re-review the new changes.

If you'd like to discuss the suggestions before coding:
Happy to clarify! The two points from my review were:

  1. Fixed 280px width can cause clipping on narrow screens — suggested making it responsive
  2. word-break: break-all splits selectors mid-word — suggested overflow-wrap: anywhere instead

Let me know which direction you'd like to go!

@1119302165 1119302165 force-pushed the fix-tooltip-overflow branch from 6115e3a to c35b413 Compare May 6, 2026 15:06
@1119302165
Copy link
Copy Markdown
Contributor Author

@lefarcen try review, change Solution Removed the floating tooltip entirely. Users can now inspect elements without visual obstruction.

Copy link
Copy Markdown
Contributor

@lefarcen lefarcen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick update, @1119302165! I see you went with a different approach — removing the tooltip entirely.

My take:

Solves the overflow problem — no tooltip means no overflow
⚠️ But loses useful information — the tooltip showed element ID, dimensions, selection type, etc. That was helpful for debugging and understanding what you're selecting.

Alternative suggestion:
Instead of removing it completely, what if we:

  1. Keep the tooltip but show it on hover instead of always-on?
  2. Or show just the essential info (element ID only) in a compact format?

This way users get the info when they need it, without it being visually obtrusive or overflowing.

Your choice:
If you prefer the "no tooltip" approach for simplicity, that's valid too — less visual clutter. But I wanted to point out that we're trading off discoverability/debugging info.

Let me know which direction you'd like to go!

@1119302165
Copy link
Copy Markdown
Contributor Author

1119302165 commented May 6, 2026

Thanks for the quick update, @1119302165! I see you went with a different approach — removing the tooltip entirely.

My take:

Solves the overflow problem — no tooltip means no overflow ⚠️ But loses useful information — the tooltip showed element ID, dimensions, selection type, etc. That was helpful for debugging and understanding what you're selecting.

Alternative suggestion: Instead of removing it completely, what if we:

  1. Keep the tooltip but show it on hover instead of always-on?
  2. Or show just the essential info (element ID only) in a compact format?

This way users get the info when they need it, without it being visually obtrusive or overflowing.

Your choice: If you prefer the "no tooltip" approach for simplicity, that's valid too — less visual clutter. But I wanted to point out that we're trading off discoverability/debugging info.

Let me know which direction you'd like to go!

@lefarcen
Thanks for your feedback. As you can see from the screenshot I uploaded, the ID and other related information are already shown in the top-left card. The tooltip is actually redundant, so removing it won’t have any impact on usage and debugging.

after fix:
image

@lefarcen
Copy link
Copy Markdown
Contributor

lefarcen commented May 6, 2026

Ah, that makes perfect sense! 💡 If the element info is already displayed in the top-left card, then the tooltip is redundant — removing it is the cleaner solution.

Thanks for the clarification and the photo! This approach is better than I initially thought. The PR removes noise while keeping the useful debugging info visible where it matters.

Updated verdict: Looks good to me. Ready for maintainer review. 👍

@1119302165
Copy link
Copy Markdown
Contributor Author

Ah, that makes perfect sense! 💡 If the element info is already displayed in the top-left card, then the tooltip is redundant — removing it is the cleaner solution.

Thanks for the clarification and the photo! This approach is better than I initially thought. The PR removes noise while keeping the useful debugging info visible where it matters.

Updated verdict: Looks good to me. Ready for maintainer review. 👍

@mrcfps

@1119302165
Copy link
Copy Markdown
Contributor Author

@lefarcen Why is the job ci / Validate workspace (pull_request) failing?
This code change does not involve any content related to this check.
Please check if this failure was caused by other merged PRs, and provide the root cause.

@lefarcen
Copy link
Copy Markdown
Contributor

lefarcen commented May 6, 2026

Good catch, @1119302165! 👍

The CI failure is not caused by your changes — it's a main-branch issue that's affecting multiple recent PRs.

Root cause:
The Validate workspace job runs e2e tests that check localization coverage. The test expects 68 skills to have German/Russian/French translations, but only 67 are present. This is a missing translation in the main branch, not related to your tooltip removal.

Evidence:

  • Your PR only touches apps/web/src/index.css (tooltip styles) — no impact on localization files
  • Recent main branch CI runs also show failures: ci failure 2026-05-06 (3 consecutive runs)
  • Error message:
    skills display copy: expected [ 'audio-jingle', 'blog-post', …(67) ] 
    to deeply equal [ 'audio-jingle', 'blog-post', …(68) ]
    

What this means for your PR:
Your code changes are clean. The CI failure is a known main-branch issue that needs to be fixed separately (likely a recent PR merged without updating all locale files).

Next steps:

  • The maintainer team will either:
    1. Fix the missing translations on main (unblocking all PRs), OR
    2. Merge your PR despite the CI failure (since it's unrelated to your changes)

cc @mrcfps — this PR is ready for merge from a code perspective; CI failure is upstream.

@lefarcen
Copy link
Copy Markdown
Contributor

lefarcen commented May 6, 2026

Hey @1119302165! 👋

Good catch — the CI failure is not caused by your PR. Here's what's happening:

Root cause:
PR #678 (merged ~1 hour ago) added a new skill social-media-dashboard, but didn't update the localized display copy for German, Russian, and French. The test localized-content.test.ts now expects 68 skills in those locales, but only 67 are present.

Your PR only changed:
apps/web/src/index.css (tooltip CSS) — completely unrelated to localization.

What happens next:
The maintainers will either:

  1. Fix the missing localization entries in a follow-up PR, OR
  2. Temporarily skip the localization check until translations are added

Your PR is clean — the CI failure is a pre-existing issue from another merged PR. I'll flag this to the team.

Thanks for raising this! 🙏

Copy link
Copy Markdown
Contributor

@mrcfps mrcfps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1119302165 I reviewed the current changed ranges in FileViewer.tsx and index.css: the tooltip markup/styles are removed while the target overlay remains in place for both single-element and pod selections, so the overflow/obstruction path is eliminated without changing the selection overlay behavior. Thanks for the quick iteration and for clarifying that the same element details remain available in the top-left card — this is a clean simplification. 🙏

Generated by Looper 0.6.1 · runner=reviewer · agent=opencode

Copy link
Copy Markdown
Contributor

@mrcfps mrcfps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1119302165 I reviewed the current changed ranges in FileViewer.tsx, index.css, and the locale fallback lists: removing the tooltip markup/styles keeps the selection overlay path intact while eliminating the overflow/obstruction case, and the added English fallback IDs cover the newly present social-media-dashboard skill and totality-festival design system across DE/RU/FR. I also verified pnpm --filter @open-design/web typecheck and pnpm test tests/localized-content.test.ts from e2e pass locally. Thanks for the quick iteration and for keeping the useful element details available outside the tooltip — this is a clean fix. 🙏

Generated by Looper 0.6.1 · runner=reviewer · agent=opencode

@lefarcen
Copy link
Copy Markdown
Contributor

lefarcen commented May 6, 2026

@1119302165 Wow, thank you for fixing the CI failure! 🙌 You identified the root cause (missing localizations from PR #678) and added the entries for social-media-dashboard and totality-festival to de/ru/fr. That's exactly what was needed.

Your PR is now:

  • ✅ Tooltip removal (clean)
  • ✅ CI fixed (localization entries added)
  • ✅ mrcfps APPROVED

Waiting for CI to re-run and confirm the fix passes. If it does, this should be ready to merge. Great work! 👏

@1119302165
Copy link
Copy Markdown
Contributor Author

1119302165 commented May 6, 2026

@mrcfps #702 Is the code you just pushed to my branch implemented in a similar way to this PR? Could you inform the author of that PR and consolidate all follow-up work here instead? this pr merge fast. @lefarcen re-run CI.

@mrcfps
Copy link
Copy Markdown
Contributor

mrcfps commented May 6, 2026

@1119302165 Yes — the i18n part I pushed here is the same fallback-list approach as #702: add social-media-dashboard and totality-festival to the de/ru/fr English-fallback registries so the existing localization coverage test passes without inventing unreviewed translations.

I kept the follow-up on this branch because #697 already needed a push to unblock its CI. I also added a small test-facing/accessibility label for the comment target overlay and fixed the e2e mock skill data so the updated full CI suite remains compatible after merging latest main.

I’ll leave a note on #702 that it duplicates the i18n portion now present here, so maintainers can close #702 if #697 lands first (or merge #702 first and then we can drop the duplicate fallback commits here if preferred).

A new CI run was already triggered by the latest push: https://github.com/nexu-io/open-design/actions/runs/25446173128

@1119302165
Copy link
Copy Markdown
Contributor Author

@mrcfps @lefarcen now CI is Successful.

@mrcfps mrcfps merged commit a5aaeb7 into nexu-io:main May 6, 2026
1 check passed
Sid-Qin added a commit to Sid-Qin/open-design that referenced this pull request May 6, 2026
@lefarcen
Copy link
Copy Markdown
Contributor

lefarcen commented May 6, 2026

Thanks for the contribution, @1119302165! 🎉

The tooltip removal + localization fix are now merged and live in main.

If you spot any issues or have more ideas, feel free to open another PR or issue anytime.

— open-design team

@1119302165 1119302165 deleted the fix-tooltip-overflow branch May 6, 2026 16:11
mrcfps pushed a commit that referenced this pull request May 6, 2026
…as failed (#700)

* fix(daemon): surface OpenCode error frames + treat empty-output runs as failed

Closes #691. OpenCode runs would silently complete in ~3 seconds without
producing any visible chat output and still be rendered as a successful
turn — three independent bugs along the structured-stream path conspired
to produce this silent-failure shape.

## Bug 1 — `apps/daemon/src/json-event-stream.ts:85-91`

OpenCode emits structured error frames on stdout (e.g. provider auth
failures, network errors, schema mismatches) and still exits 0. The
parser was downgrading these to `{type: 'raw', line: ...}`, which the
chat UI does not render as an assistant message. The error string was
discarded as "no-op output."

Fix: emit a proper `{type: 'error', message, raw}` event matching the
qoder-stream contract that the daemon's existing error-handling path
already recognises.

## Bug 2 — `apps/daemon/src/server.ts:4199-4205`

Even after Bug 1 was fixed, the json-event-stream branch wired the
parser to a bare `(ev) => send('agent', ev)` lambda — bypassing the
`sendAgentEvent` wrapper that interprets `type:'error'` events and
sets the `agentStreamError` flag the close handler reads to flip the
run to `failed`. So an emitted `error` event would just be forwarded
as a no-op `agent` SSE event with no lifecycle effect.

Fix: route json-event-stream through `sendAgentEvent`, mirroring the
qoder-stream-json wiring at line 4175.

## Bug 3 — `apps/daemon/src/server.ts:4220-4234`

Even after Bugs 1 and 2 are fixed, there's still a class of runs where
OpenCode never emits any error frame, never emits any substantive
event, and exits 0. Pre-fix this was marked `succeeded` and the user
saw a blank chat with no diagnostic.

Fix: track `agentProducedOutput` inside `sendAgentEvent` (set on
`text_delta`, `thinking_delta`, `tool_use`, `tool_result`, `artifact`
— deliberately NOT on `status` / `usage`, since a model can emit
token-usage numbers for an empty completion). When the close handler
sees `code === 0 && trackingSubstantiveOutput && !agentProducedOutput`
the run is marked `failed` with an explicit AGENT_EXECUTION_FAILED
SSE error so the chat shows a clear reason instead of a silent
empty turn.

The check is gated by `trackingSubstantiveOutput` so it only fires
on streams that actually contribute to the output flag (currently
qoder-stream-json and json-event-stream). ACP sessions and plain
stdout streams keep their existing success/failure determination.

## Tests

- 3 new unit tests in `apps/daemon/tests/json-event-stream.test.ts`
  pin the OpenCode error event shape: full repro
  (`error.data.message`), `error.name` fallback, and the
  generic-fallback shape when `error` is empty.
- All 60 daemon test files (851 tests) pass on `pnpm --filter
  @open-design/daemon test`. All 42 web test files (309 tests) pass
  on `pnpm --filter @open-design/web test`.
- Full repo `pnpm typecheck` clean.

## Live verification

Verified end-to-end via a stub `opencode` binary that mimics each of
the failure shapes against `pnpm tools-dev run web`:

1. Stub emits `{"type":"error",...}` then `exit 0` — run now ends as
   `failed` with the OpenCode error message surfaced as an SSE
   `error` event. Pre-fix this was `succeeded` with an empty chat.
2. Stub emits nothing then `exit 0` — run now ends as `failed` with
   "Agent completed without producing any output…" diagnostic.
   Pre-fix this was `succeeded` with an empty chat.
3. Stub emits a normal `step_start` / `text` / `step_finish` sequence
   then `exit 0` — run still succeeds. (Regression check.)

## Out of scope (mentioned for the next person)

- `claude-stream-json` and `copilot-stream-json` still wire to a bare
  `(ev) => send('agent', ev)` and don't currently parse `type:'error'`
  frames. If their CLIs ever start emitting structured error events
  the same pattern (route through `sendAgentEvent` + emit proper
  `type:'error'`) applies. Not in scope here because we have no
  evidence those CLIs do this today, and changing the wiring without
  a confirmed failure mode risks regressing currently-working flows.
- ACP sessions (`pi-rpc`, `acp-json-rpc`) own their own success /
  failure determination via `acpSession?.hasFatalError()` and the
  empty-output guard explicitly skips them via
  `trackingSubstantiveOutput`.
- Plain stdout streams have no event-level tracking, so the empty-
  output guard skips them too. Diagnosing a no-output plain-stream
  agent is a separate problem that needs different signals.

* chore: retrigger CI on top of green main (post #697 i18n backfill)
lefarcen added a commit that referenced this pull request May 7, 2026
- bump 13 monorepo package.json files to 0.5.0 (root + apps/{web,daemon,desktop,packaged,landing-page} + packages/{contracts,platform,sidecar,sidecar-proto} + tools/{dev,pack} + e2e); apps/packaged was already at 0.4.2 from beta lane, all others at 0.4.1
- add CHANGELOG.md [0.5.0] - 2026-05-07 entry covering 51 merged PRs since 0.4.1:
  - Added: Inspect mode (#362), accent color control + launcher (#683), connection tests for execution settings (#507), four Live Dashboard templates / skill (#778, #795, #799, #801), waitlist-page / social-media-dashboard / Orbit briefing skills (#555, #678, #671), Critique Theater Phase 5 (#524), Qoder CLI agent (#626), Nano Banana image provider (#631), HyperFrames video previews (#293), project transcript export (#493), Linux headless lifecycle (#686), Windows beta packaging + R2 publishing (#768, #805), Indonesian locale (#414), form-validation craft module (#625)
  - Changed: project file watcher ignores .venv (#531), portless Origin in CORS (#735), extended OpenAI image timeouts (#788), surfaced @nexudotio X account (#696)
  - Fixed: Copilot stdin (#727), OpenCode error frames (#700), GUI-launched agent PATH discovery (#614), Tweaks-mode tooltip (#697), chat pane overflow (#740), ws-tabs-bar scrollbar (#781), settings dialog scroll (#667), settings subtitle width (#747), design system selection persistence (#621) + test fixture (#708), PDF popup blocked alert (#664), Windows link-code-folder dialog (#698), desktop entry chrome (#655), Claude Design ZIP import on Node 24 (#591), missing Next package diagnostics (#675), README.es alignment (#611), Ukrainian template fixes (#674, #680), batch fixes (#530)
  - Documentation/Internal: OD_LEGACY_DATA_DIR migrator (#712), Linux tools-pack namespace doc (#670), pi-ai link split fix (#277), desktop e2e coverage (#306), Discord notify on resolved (#685), generated GitHub metrics + contributors wall (#718, #720)

Release workflow validation runs after merge via release-stable.
lefarcen added a commit that referenced this pull request May 7, 2026
- bump 13 monorepo package.json files to 0.5.0 (root + apps/{web,daemon,desktop,packaged,landing-page} + packages/{contracts,platform,sidecar,sidecar-proto} + tools/{dev,pack} + e2e); apps/packaged was already at 0.4.2 from beta lane, all others at 0.4.1
- add CHANGELOG.md [0.5.0] - 2026-05-07 entry covering 51 merged PRs since 0.4.1:
  - Added: Inspect mode (#362), accent color control + launcher (#683), connection tests for execution settings (#507), four Live Dashboard templates / skill (#778, #795, #799, #801), waitlist-page / social-media-dashboard / Orbit briefing skills (#555, #678, #671), Critique Theater Phase 5 (#524), Qoder CLI agent (#626), Nano Banana image provider (#631), HyperFrames video previews (#293), project transcript export (#493), Linux headless lifecycle (#686), Windows beta packaging + R2 publishing (#768, #805), Indonesian locale (#414), form-validation craft module (#625)
  - Changed: project file watcher ignores .venv (#531), portless Origin in CORS (#735), extended OpenAI image timeouts (#788), surfaced @nexudotio X account (#696)
  - Fixed: Copilot stdin (#727), OpenCode error frames (#700), GUI-launched agent PATH discovery (#614), Tweaks-mode tooltip (#697), chat pane overflow (#740), ws-tabs-bar scrollbar (#781), settings dialog scroll (#667), settings subtitle width (#747), design system selection persistence (#621) + test fixture (#708), PDF popup blocked alert (#664), Windows link-code-folder dialog (#698), desktop entry chrome (#655), Claude Design ZIP import on Node 24 (#591), missing Next package diagnostics (#675), README.es alignment (#611), Ukrainian template fixes (#674, #680), batch fixes (#530)
  - Documentation/Internal: OD_LEGACY_DATA_DIR migrator (#712), Linux tools-pack namespace doc (#670), pi-ai link split fix (#277), desktop e2e coverage (#306), Discord notify on resolved (#685), generated GitHub metrics + contributors wall (#718, #720)

Release workflow validation runs after merge via release-stable.
lefarcen added a commit that referenced this pull request May 7, 2026
- bump 13 monorepo package.json files to 0.5.0 (root + apps/{web,daemon,desktop,packaged,landing-page} + packages/{contracts,platform,sidecar,sidecar-proto} + tools/{dev,pack} + e2e); apps/packaged was already at 0.4.2 from beta lane, all others at 0.4.1
- add CHANGELOG.md [0.5.0] - 2026-05-07 entry covering 51 merged PRs since 0.4.1:
  - Added: Inspect mode (#362), accent color control + launcher (#683), connection tests for execution settings (#507), four Live Dashboard templates / skill (#778, #795, #799, #801), waitlist-page / social-media-dashboard / Orbit briefing skills (#555, #678, #671), Critique Theater Phase 5 (#524), Qoder CLI agent (#626), Nano Banana image provider (#631), HyperFrames video previews (#293), project transcript export (#493), Linux headless lifecycle (#686), Windows beta packaging + R2 publishing (#768, #805), Indonesian locale (#414), form-validation craft module (#625)
  - Changed: project file watcher ignores .venv (#531), portless Origin in CORS (#735), extended OpenAI image timeouts (#788), surfaced @nexudotio X account (#696)
  - Fixed: Copilot stdin (#727), OpenCode error frames (#700), GUI-launched agent PATH discovery (#614), Tweaks-mode tooltip (#697), chat pane overflow (#740), ws-tabs-bar scrollbar (#781), settings dialog scroll (#667), settings subtitle width (#747), design system selection persistence (#621) + test fixture (#708), PDF popup blocked alert (#664), Windows link-code-folder dialog (#698), desktop entry chrome (#655), Claude Design ZIP import on Node 24 (#591), missing Next package diagnostics (#675), README.es alignment (#611), Ukrainian template fixes (#674, #680), batch fixes (#530)
  - Documentation/Internal: OD_LEGACY_DATA_DIR migrator (#712), Linux tools-pack namespace doc (#670), pi-ai link split fix (#277), desktop e2e coverage (#306), Discord notify on resolved (#685), generated GitHub metrics + contributors wall (#718, #720)

Release workflow validation runs after merge via release-stable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Fixes an existing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants