Feature request - Metrics and streak freezes
Great plugin. Appreciate the work. I think it will be very cool to have some metrics visible for my habits such as longest streak, completed days/total days, perfect days (where a given number of habits were compelted) etc. Similarly, it would also be very useful to define streak freezes. For example, I track days I exercised (run/swim/cycling/gym) but my body also needs a 1 day rest. So, instead of loosing my streak each week, it will be nice to freeze it.
I have already implemented these changes in the code and am using this version myself currently. I also have all the changes documented which i can provide as a summary. Happy to create a PR for the same. 😊
This is what i love about Obsidian that people like you can take amazing spins on existing functionality 👏 A lot of great ideas in what you shared,. Let's have a chat about them. Here are my thoughs
-
Habits that don't happen every day How do you track freeze days in your implementation? I'm curios from a UX pov I'd like to have freeze days defined from the habit file. E.g. my habit happens every other day/every week/month etc I think having freeze days defined manually might break the power that streaks have to motivate me to keep going, since I'll be able to just mark a skipped day as skip day, and pretend I actually wanted to do that
-
Stats To keep things simple I'd add a hover state on each habit title where it could say the stats, maybe only the "ever" part, since 21 days is not a long period and you can tell at a glance what stats you have. This last part I don't have a strong prefference I'd like to have stats per habit in each habit file, and in general enhance the experience for people looking at a habit
But if you want to have one place to see all stats: how do you do it now? a different codeblock marker e.g. habittracker_stats or do you have a toggle to switch between tracking and stats?
Glad you like the idea. Here's how ive implemented it
Streak freeze
I've defined 3 settings in the settings which apply globally to all habits. They can also be defined individually in the yaml for the habit to override the global. For understanding each of the 3 properties, consider an ongoing 7 day streak. a. streak_freeze - the number of consecutive days you can use freeze. So, if this is set to 1, day 8 you can freeze and on day 9 the streak breaks. If it were set to 2, streak would break on day 10. b. max_freezes - the number of freezes you're allowed in a 7 day period. So, if after using your streak on day 8 you resume on 9 and 10 but skip 11 again, freeze won't apply. c. freeze_penalty - if set to 0, after skipping day 8, day 9 will count as 8th day of your streak. But if this was set to 1, then streak resumes from 7 again as you were penalized one day. Similarly it can be set to 2 Nd you would resume your streak from 6.
Examples -
- Sleep 8hrs habit - This is non negotiable for me. So I set streak freezes to 0. Hence, I can never freeze it
- Exercise habit - 1 streak_freeze, 0 penalty, and max is 1. So I can workout 6 days a week and my streak continues.
- Study something new habit - 1 streak freeze, 1 penalty and max is 2. So I can do this 5 days/week and that's good enough. But my streak will be at the end of the week if I only do 5 days (in the 2-freeze-2-freeze-1 scenario)
Metrics
For now I added a separate codeblock called habittrackermetrics. Accepts the same parameters as the habittracker codeblock but instead of rendering the graph, it renders the metrics table. This way people can choose to see the metrics or not. The issue with hover is that it doesn't work on phone. And for habits, I pretty much use phone as the primary input device.
The reason I added metrics over two time periods is to be able to see my long term progress and how I've been doing recently. For example, I used to be very bad with my Writing habit earlier (30% all time) but in the last 3 weeks (21 days) I've been better so it's at 56%.
In the future, I want to be able to specify the metrics as parameters in the codeblock and then it only renders the selected metrics. But I haven't added this yet.
Regards, Shreshth Mehra
On Sat, 29 Nov, 2025, 12:19 am zinc++, @.***> wrote:
zincplusplus left a comment (zincplusplus/habit-tracker#60) https://github.com/zincplusplus/habit-tracker/issues/60#issuecomment-3590131941
This is what i love about Obsidian that people like you can take amazing spins on existing functionality 👏 A lot of great ideas in what you shared,. Let's have a chat about them. Here are my thoughs
Habits that don't happen every day How do you track freeze days in your implementation? I'm curios from a UX pov I'd like to have freeze days defined from the habit file. E.g. my habit happens every other day/every week/month etc I think having freeze days defined manually might break the power that streaks have to motivate me to keep going, since I'll be able to just mark a skipped day as skip day, and pretend I actually wanted to do that 2.
Stats To keep things simple I'd add a hover state on each habit title where it could say the stats, maybe only the "ever" part, since 21 days is not a long period and you can tell at a glance what stats you have. This last part I don't have a strong prefference I'd like to have stats per habit in each habit file, and in general enhance the experience for people looking at a habit
But if you want to have one place to see all stats: how do you do it now? a different codeblock marker e.g. habittracker_stats or do you have a toggle to switch between tracking and stats?
— Reply to this email directly, view it on GitHub https://github.com/zincplusplus/habit-tracker/issues/60#issuecomment-3590131941, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJJRQJEQNCIUZX7ET2MRNND37CKLJAVCNFSM6AAAAACNLNNPSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKOJQGEZTCOJUGE . You are receiving this because you authored the thread.Message ID: @.***>
Cool! I like all the above. Let me play a bit with the UX to try the versions I have in my head and I'll be back with a clear pov. And then if you like it and wanna code something up ir would be amazing
This is how I'm thinking of showing a 1 day allowed gap
And this would be 2 days allowed gap
wdyt?
That's quite interesting. Though personally i like i the freeze emoji. In my code, i added a setting for it allowing the user to use whatver emoji they like to represent the freeze.
I'd rather not add the emoji setting. I think having a single, intentional and minimalist visual style keeps things simpler and more attractive. Let's go with the gap approach for now. If you want to code the rest of the PR I can add the styling after or share the CSS with you.