Skip to content

Hardware details: replace index-based selectedTrees with stable tree identifiers #1909

@alanpeixinho

Description

@alanpeixinho

Problem

Hardware pages send selectedCommits as { "0": "head"|hash, … } keyed by the tree’s position in an ordered list. The backend resolves that against ordering in get_hardware_trees_head_commits, and the UI mirrors this with treeIndexes / treeCommits[].
Any mismatch in sort order across summary, tabs, caches, or refactors silently maps the wrong commit to the wrong tree.

Goal

Selections should survive reordering (and differing list order implementations) by identifying trees with a unique key derived from checkout identity (most likely a concatenation of important info (tree name/branch/repo_url, or a key derived of this tuple)).

Acceptance criteria

  • Selecting trees and pinning commits yields correct data after even if we reorder the tree table (same trees, same selection).
  • Old clients using numeric selectedCommits keys still work for one release.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions