Skip to content

Feature: Copy Resource ID to Clipboard #59

@yimsk

Description

@yimsk

Context

In the Multi-Profile/Multi-Region update, the internal Resource.GetID() implementation was changed to return a composite ID:
profile:region:resource-id

This ensures uniqueness in the UI list when displaying resources from multiple sources.

Requirement

When implementing a 'Copy ID to Clipboard' feature in the future:

  1. The action MUST NOT copy the raw GetID() value (which includes profile/region prefixes).
  2. The action MUST unwrap the resource or parse the string to extract the actual AWS Resource ID.
  3. Use the helper dao.UnwrapResource(res) or check interfaces RegionalResource / ProfiledResource to get the underlying ID.

Reference

Current implementation in internal/dao/dao.go:

func UnwrapResource(res Resource) Resource {
    if pr, ok := res.(*ProfiledResource); ok {
        return pr.Resource
    }
    if rr, ok := res.(*RegionalResource); ok {
        return rr.Resource
    }
    return res
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions