MaibornWolff / MaibornWolff/codecharta

How should age in weeks be handled for deleted files in delta mode?

Open
#3,481 0 comments 0 reactions 0 assignees View on GitHub
pr-visualization question UX / UI
Dominant language
TypeScript
Stars
529
Forks
56
Avg merge
7h 17m
Merged PRs (30d)
34

Description

# Question

Currently in delta mode the age in weeks metric of deleted files is handled in a confusing way. The following screenshot shows a file that was 266 weeks old in the reference map (left selector) and was deleted in the comparison map (right selector)
![image](https://github.com/MaibornWolff/codecharta/assets/105795397/ddd0642b-a4c5-4ff2-9cbb-215c0a7fe870)
This is confusing as it suggests the file is currently 266 weeks old and the age has changed by -266 weeks. This can be understood as it is now 266 weeks 'younger' than before meaning before the file was 500+ weeks old, which is false

When swapping the reference and comparison maps, the files metrics change as follows:
![image](https://github.com/MaibornWolff/codecharta/assets/105795397/722e7320-83cc-453b-9b79-ae082bb75591)
Suggesting the file is now 266 weeks old and was 0 weeks old (which makes more sense as one map does not include the file)

**Is this behaviour wanted or how should deleted files be handled?**
My suggestion would be that if the comparison map does not include the file, the metric simply includes a '-' to indicate it is not there, while keeping the delta value. This would make it more clear that it has been deleted and now does not have an age.

## Preparation

Please check these resources first before posting a question

* [x] I searched for answers in [older issues](https://github.com/MaibornWolff/codecharta/issues?utf8=%E2%9C%93&q=)
* [x] I looked into the [README.md](https://github.com/MaibornWolff/codecharta)
* [x] I read the [website](https://maibornwolff.github.io/codecharta/)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how delta mode represents the age-in-weeks metric when a file exists only in the reference or comparison map. Review the README.md and website context, then compare the two examples in the issue. Done means the project has a decided and consistently documented representation for deleted files, with the delta remaining understandable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.