Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 14, 2025

Problem

When the "Navigate to TTD Timestamp" dialog opens, the current timestamp is displayed in the input field but not selected. This requires users to manually select the text before they can:

  • Copy the current timestamp to clipboard
  • Paste a new timestamp to navigate to

This creates unnecessary friction in a common workflow when working with Time Travel Debugging (TTD).

Solution

Added a call to selectAll() on the timestamp QLineEdit field after populating it with the current TTD position. This automatically selects/highlights the text when the dialog opens.

Changes

Modified: ui/timestampnavigationdialog.cpp

In the initializePositions() method, after setting the text:

m_timestampEdit->setText(positionText.toUpper());
m_timestampEdit->selectAll();  // Select text for easy copy/paste

User Experience Improvement

Before:

  • Dialog opens showing "13900:1DAC" with cursor at end
  • User must triple-click or drag to select text
  • Then can copy or paste

After:

  • Dialog opens with "13900:1DAC" already selected
  • Immediate Ctrl+C to copy current position
  • Immediate Ctrl+V to paste and replace with new position
  • Immediate typing to replace with new value

This follows standard UI patterns where pre-populated dialog fields have their content selected by default, making them immediately ready for user action.

Testing

The change follows Qt's standard QLineEdit API and patterns used throughout Qt applications. No additional testing infrastructure is required for this UI enhancement.

Fixes the issue reported in #[issue_number] where @xusheng6 requested this functionality improvement.

Original prompt

This section details on the original issue you should resolve

<issue_title>Navigate to TTD Timestamp dialog should have the current timestamp selected by default</issue_title>
<issue_description>So that I can directly paste a new one into it, or copy the current one</issue_description>

Comments on the Issue (you are @copilot in this section)

@xusheng6 Image

Fixes #870


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Copilot Copilot AI changed the title [WIP] Set current timestamp as default in TTD dialog Auto-select timestamp text in TTD navigation dialog Oct 14, 2025
@Copilot Copilot AI requested a review from xusheng6 October 14, 2025 03:28
Copilot finished work on behalf of xusheng6 October 14, 2025 03:28
@xusheng6 xusheng6 marked this pull request as ready for review October 17, 2025 04:30
@xusheng6 xusheng6 merged commit 1d32b55 into dev Oct 17, 2025
1 check was pending
@xusheng6 xusheng6 deleted the copilot/set-default-timestamp branch October 17, 2025 04:31
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.

Navigate to TTD Timestamp dialog should have the current timestamp selected by default

3 participants