Skip to content

feat: Inline "Copied" confirmation and clickable copy/dismiss hints on AlertLine#26

Merged
FXschwartz merged 3 commits into
mainfrom
5425-copied-alert-message
Jul 3, 2026
Merged

feat: Inline "Copied" confirmation and clickable copy/dismiss hints on AlertLine#26
FXschwartz merged 3 commits into
mainfrom
5425-copied-alert-message

Conversation

@FXschwartz

Copy link
Copy Markdown
Contributor

Reworks the pinned AlertLine copy/dismiss:

  • Inline "Copied" confirmation. Pressing C (or clicking the hint) now swaps the C Copy hint for a green ✓ Copied for ~2s using the same /success color as completed operations in the log.
  • Clickable hints. C Copy and Esc Dismiss are now clickable, not just keyboard shortcuts.
click-top-copy.mp4

@FXschwartz FXschwartz self-assigned this Jul 3, 2026
Copilot AI review requested due to automatic review settings July 3, 2026 17:00

@marcelomendoncasoares marcelomendoncasoares left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Formatting needs fixing, but LGTM! ✅

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the alert UX for copy/dismiss actions by moving the “copied” feedback inline into AlertLine and enabling click/tap interaction on the hint labels, backed by new state (alertCopied) and timer-based clearing behavior in the base app state.

Changes:

  • Add alertCopied state and a 2s timer window to show/clear an inline ✓ Copied confirmation after copying an alert segment.
  • Make AlertLine’s Copy / Dismiss hints clickable via required onCopy / onDismiss callbacks (breaking API change).
  • Bump package version to 0.8.0 and document changes in CHANGELOG.md.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/alert_test.dart Updates tests to assert inline copied state (alertCopied) and removal of bottom hint line for alert copy.
test/alert_line_test.dart Updates rendering helper for new AlertLine required params and adds coverage for copied-confirmation rendering.
pubspec.yaml Version bump to 0.8.0 to reflect breaking API change.
lib/src/state.dart Adds alertCopied state to support inline copied confirmation.
lib/src/app.dart Adds copyAlert() logic + timer to set/clear alertCopied; clears state/timer on dismiss.
lib/src/app_state_holder.dart Resets alertCopied when showing a new alert.
lib/src/alert_line.dart Introduces clickable hint groups, new callbacks, and copied rendering mode.
CHANGELOG.md Documents new features and breaking AlertLine API change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/src/alert_line.dart
Comment on lines +138 to +148
/// Renders one hint group as a clickable [GestureDetector]. [MainAxisSize.min]
/// keeps the hit area to the text so only that hint responds to a tap.
Component _hint(List<(String, TextStyle)> spans, VoidCallback onTap) {
return GestureDetector(
onTap: onTap,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [for (final (text, style) in spans) Text(text, style: style)],
),
);
}
@FXschwartz FXschwartz merged commit 51b3c59 into main Jul 3, 2026
4 checks passed
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.

3 participants