Shopify / Shopify/shadowenv

Preserve ordering when re-inserting removed items into lists on undo

Open
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
458
Forks
22
PR merge metrics
No merged PRs in 30d

Description

env/remove-from-pathlist removes items from the pathlist, but doesn't preserve the index from which they were removed, so when the user leaves the directory in which they were removed, the items are likely not reinserted to the correct location in the pathlist.

We could solve this by keeping richer undo data.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the env/remove-from-pathlist operation and trace how its undo data is recorded and applied when leaving a directory. Define the richer undo information needed to retain each removed item's original index, then verify that undo restores the pathlist ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.