Skip to content

nvm#21136

Closed
haddoumounir wants to merge 5 commits intoanomalyco:devfrom
haddoumounir:dev
Closed

nvm#21136
haddoumounir wants to merge 5 commits intoanomalyco:devfrom
haddoumounir:dev

Conversation

@haddoumounir
Copy link
Copy Markdown

@haddoumounir haddoumounir commented Apr 5, 2026

nvm

Improve how pasted snippets are represented in the prompt UI so each paste block is easier to identify at a glance.

- Add numbered paste summaries, producing labels like [Pasted 1 ~8 lines].
- Handle singular/plural line labels for cleaner copy.
- Introduce deterministic per-paste colors derived from paste index.
- Register dynamic styles and apply them to pasted text extmarks.

When multiple snippets are pasted, identical markers are hard to distinguish. Numbering and stable color coding make each block visually traceable without expanding it.
Make pasted summary markers interactive and ensure expanded content is submitted with correct part mapping.

- Add mouse-up toggle support to expand or collapse pasted summary extmarks in place.
- Preserve cursor and viewport stability while toggling.
- Expand text parts through a dedicated submit path and rebuild part offsets from the expanded input.
- Update extmark restoration and sync flows so edited expanded text is persisted back to prompt parts.

This keeps prompts compact by default while allowing quick inspection/editing of pasted content without breaking submission correctness.
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Hey! Your PR title Improve pasted text UX in TUI prompt doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found 2 related PRs that may be addressing similar or overlapping functionality:

  1. PR feat(tui): make pasted summaries expandable/collapsible in prompt #17248 - feat(tui): make pasted summaries expandable/collapsible in prompt

    • Directly related: implements expandable/collapsible pasted summaries in the prompt
  2. PR feat(tui): Allow to expand pasted text (AKA "pasted summary") #8496 - feat(tui): Allow to expand pasted text (AKA "pasted summary")

    • Directly related: earlier implementation of pasted text expansion functionality

Why they're potentially related: Both of these PRs implement paste expansion/collapse toggle functionality in TUI prompts, which is one of the core features in PR #21136. You may want to review these to ensure there's no overlap in functionality or approach.

@haddoumounir haddoumounir changed the title Improve pasted text UX in TUI prompt feat(opencode): improve pasted text UX in TUI prompt Apr 5, 2026
@github-actions github-actions bot removed needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Reduce flakiness in the Runner cancel interruption test under CI load.

- Replace timing-based startup wait with an explicit Deferred started signal.
- Run cancel through a forked fiber and await it with a bounded timeout.
- Await the ensureRunning fiber with a bounded timeout before asserting failure.

This avoids hangs where scheduling jitter causes cancellation/await ordering to become nondeterministic.
Stabilize the status popover test flow that intermittently fails on Windows runners due to detached/unstable tab elements.

- Retry opening the status popover with force-click and keyboard fallback.
- Wait for popover visibility with bounded retries before asserting.
- Poll plugins tab selection state and re-resolve locator between attempts.

This targets the recurring e2e failure in status-popover can switch to plugins tab without changing app runtime behavior.
@haddoumounir haddoumounir changed the title feat(opencode): improve pasted text UX in TUI prompt nvm Apr 6, 2026
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@haddoumounir haddoumounir marked this pull request as draft April 6, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:compliance This means the issue will auto-close after 2 hours. needs:title

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant