Skip to content

[CLI] Display long available device id - #13338

Merged
AureliaDolo merged 1 commit into
masterfrom
aurelia/cli/device-forget/use_long_id
Sep 17, 2026
Merged

AureliaDolo merged 1 commit into
masterfrom
aurelia/cli/device-forget/use_long_id

Conversation

@AureliaDolo

Copy link
Copy Markdown
Contributor

So forget local device can display the full ID.
Fix #8602

@AureliaDolo
AureliaDolo requested a review from a team as a code owner September 3, 2026 12:52

@FirelightFlagboy FirelightFlagboy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The goal of the refactor was also to normalize how to show things to user.

Better to choose one version only, I would prefer the long format

@AureliaDolo

Copy link
Copy Markdown
Contributor Author

From what I understand of the issue, the goal was to just display the long id during the confirmation process. It may be worth having a look if there are other places where the id is displayed for confirmation.

I'd rather keep the short id, at least in the list that is shown when a device id is missing from a command. What to do with the real list available device is up to discussion.

Or we could get rid of the short ids completely ? Or never show them but still be able to accept them as input (or there maybe there is some auto completion trick that can be done ?)

@FirelightFlagboy

Copy link
Copy Markdown
Contributor

For displaying short id, you cannot use an hardcoded value because it may not display enough information to discriminate one device from another.

You need the length of the id to be adapted accordingly following the global context.
See how it's done for format_device:

pub fn format_devices(
devices: &[AvailableDevice],
mut f: impl std::fmt::Write,
) -> std::fmt::Result {
let short_id_size = get_minimal_short_id_size(devices.iter().map(|d| &d.device_id));
for device in devices {
let short_id = &device.device_id.hex()[..short_id_size];

@AureliaDolo
AureliaDolo force-pushed the aurelia/cli/device-forget/use_long_id branch from 1cb14ae to e097a2d Compare September 15, 2026 09:54
@AureliaDolo AureliaDolo changed the title [CLI] Split AvailableDeviceDisplay into Long and Short variant. [CLI] Display long available device id Sep 15, 2026
@AureliaDolo
AureliaDolo force-pushed the aurelia/cli/device-forget/use_long_id branch from e097a2d to b92c70b Compare September 15, 2026 09:56
@AureliaDolo
AureliaDolo added this pull request to the merge queue Sep 17, 2026
Merged via the queue into master with commit 07492a4 Sep 17, 2026
14 checks passed
@AureliaDolo
AureliaDolo deleted the aurelia/cli/device-forget/use_long_id branch September 17, 2026 07:49
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.

[CLI] Command device remove use a fixed short_id for device when displaying confirmation message

2 participants