Skip to content

AI-Assisted Feature Request dialog should not close after AI provider is selected #652

Description

@ScooterTech

Report preparation

  • I used the AI-assisted bug report tool (Help → Support → File an Issue)
  • I have attached a support bundle or log file

What happened?

Good clarification — the prompt isn't pre-filled into the AI's URL, it's copied to the clipboard so the user pastes it manually into the AI chat. Here's the corrected issue:


Title

AI-Assisted Feature Request dialog should not close after AI provider is selected


## What

The **AI-Assisted Feature Request** dialog closes immediately after the user
selects an AI provider. The correct workflow the dialog intends is:

1. Open the AI-Assisted Feature Request dialog
2. Select an AI provider → AetherSDR copies a canned prompt to the clipboard
   and opens the AI's website in the browser
3. User pastes the canned prompt into the AI chat and edits it to describe
   their feature request or bug
4. AI generates a well-structured response
5. User copies the AI's response from the browser
6. User returns to AetherSDR to paste the response and click **Submit your idea**

The problem is that the dialog closes at step 2. When the user returns at
step 6 and clicks the Feature Request lightbulb to reopen it, AetherSDR
**overwrites the clipboard with the canned prompt again** — destroying the
AI-generated response the user just copied from the browser. The user must
then switch back to the browser, re-copy the AI's answer, and race back to
paste it before anything else touches the clipboard.

## Why

Closing the dialog after the AI provider is selected breaks the only path to
submission. The **Submit your idea** button (which opens GitHub with the
content) lives inside that dialog — there is no other way to reach it. The
user is forced to reopen the dialog, and reopening it triggers the clipboard
overwrite, making the round-trip actively destructive.

The dialog should stay open and waiting while the user interacts with the AI
in the browser, so they can return and paste directly into the still-open form.

## How Other Clients Do It

AI-assisted issue submission flows in other tools keep the originating form
open while the user works with the AI:

- **GitHub's "Summarize with Copilot"** — the issue creation form stays open;
  the user never loses their place.
- **Linear AI issue creation** — the issue panel remains open while the user
  interacts with AI suggestions.

The consistent pattern: the dialog that initiated the AI request stays open
and waiting for the user to return with the generated content.

## Suggested Behavior

- **Do not close the dialog after the AI provider button is clicked.**
- Keep the dialog open and visible while the user pastes the canned prompt
  into the browser, edits it, gets the AI response, and copies it.
- The clipboard must **not** be overwritten a second time when the user
  returns to the already-open dialog.
- Optionally display a hint label after the provider is selected, e.g.:
  `"Prompt copied — paste into the AI chat, then paste the response below
  and click Submit your idea."`
- The dialog should only close when the user clicks **Submit your idea** or
  explicitly cancels/closes it.

## Protocol Hints

Not applicable — this is a pure GUI/UX issue within the
`AI-Assisted Feature Request` dialog. No FlexLib API calls involved.

The fix is likely a one-line change: remove the `close()` / `accept()` call
from the AI provider button's click handler. The canned prompt is already
on the clipboard and the browser is already open — there is no reason to
dismiss the dialog at that point.

```cpp
// Likely current behavior (pseudocode):
connect(m_claudeButton, &QPushButton::clicked, this, [this]() {
    QGuiApplication::clipboard()->setText(m_cannedPrompt);
    QDesktopServices::openUrl(claudeUrl);
    close();  // <-- remove this line
});

---

That should now accurately reflect the real flow. The phrase "canned prompt" is also useful for the developer — it makes clear the clipboard write is intentional and happens at provider-selection time, which is exactly why re-opening the dialog is so destructive.

### What did you expect?

_No response_

### Steps to reproduce

_No response_

### Radio model & firmware

_No response_

### Linux distro & Qt version

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions