Skip to content

feat(habitica): add Habitica task dashboard#799

Merged
spiros132 merged 3 commits into
noctalia-dev:mainfrom
Vasqs:feat/habitica-plugin
Jun 6, 2026
Merged

feat(habitica): add Habitica task dashboard#799
spiros132 merged 3 commits into
noctalia-dev:mainfrom
Vasqs:feat/habitica-plugin

Conversation

@Vasqs

@Vasqs Vasqs commented May 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds habitica, a Noctalia Shell plugin for Habitica users.

The plugin provides:

  • A bar widget with pending due dailies/open todos count
  • A panel with Habitica profile stats, avatar, currency, dailies, todos, and optional habits
  • Task scoring for dailies, todos, habits, and checklist items
  • Settings for Habitica credentials, refresh interval, task limits, tag filtering, checklist display, and theme colorization
  • Local avatar rendering from official Habitica sprite assets
  • A real 960x540 preview generated from the running Noctalia UI

Why

Habitica is a task manager/game used for daily routines and habits. This plugin lets users check and score their current Habitica work directly from Noctalia without opening the web or mobile app.

Testing

  • Validated habitica/manifest.json and habitica/i18n/en.json with python -m json.tool
  • Verified habitica/preview.png is a 960x540 PNG
  • Ran local grep checks matching this repository's code-quality workflow patterns for:
    • hardcoded user-facing text, label, and description strings
    • hardcoded numeric border.width, spacing, pointSize, radius, and margin style fields
    • console.log
  • Ran a local credential scan; it found only code field names and empty defaults, not credential values
  • Smoke-tested the plugin in Noctalia before packaging, including the panel and avatar assembly

Notes

  • settings.json and cache/ are ignored so local Habitica credentials and cached API responses are not published.
  • The standalone source repository is also available at https://github.com/Vasqs/noctalia-habitica.

Noctalia users can now connect Habitica from the shell, see their avatar and stats, inspect active work, and score supported tasks without switching context. The submission follows the registry shape with a real preview image, English strings, README documentation, and local-only credential/cache ignores.

Constraint: The registry requires the manifest repository field to point at noctalia-dev/noctalia-plugins.
Constraint: The preview image must be 16:9 at 960x540.
Rejected: Submit a mock preview | reviewers need a faithful capture of the real plugin UI
Confidence: high
Scope-risk: narrow
Directive: Keep settings.json and cache/ ignored; do not include local Habitica credentials or cached account data.
Tested: JSON validation for manifest.json and i18n/en.json
Tested: preview.png verified as 960x540 PNG generated from a real Noctalia screenshot
Tested: Local grep checks matching the registry code-quality patterns for hardcoded user-facing strings, hardcoded numeric style fields, and console.log
Tested: Credential scan found only code field names and empty defaults, not credential values
Not-tested: Full GitHub Actions run before PR creation
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

Automatic Code Quality Review


File: habitica/BarWidget.qml

  • (L) Line 154: When it comes to translations there is no need for fallback values. From: pluginApi?.tr("example") || "value". To: pluginApi?.tr("example")
+    tooltip += "\n" + (main?.hpText() || pluginApi?.tr("tooltip.hpFallback")) + " - " + (main?.xpText() || pluginApi?.tr("tooltip.xpFallback")) + " - " + (main?.goldText() || pluginApi?.tr("tooltip.goldFallback"))

The automatic code-quality review flagged a low-priority translation fallback pattern. The tooltip fallbacks now assign translated labels to local variables before composing the string, keeping behavior unchanged while satisfying the registry guidance.

Constraint: Address review automation without changing plugin behavior.
Confidence: high
Scope-risk: narrow
Tested: Local grep check for pluginApi.tr fallback expressions
@Vasqs

Vasqs commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in d394bab: the tooltip translation fallbacks now use local variables before composing the tooltip string, so the flagged pluginApi?.tr(...) || ... pattern is gone.

@spiros132 spiros132 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedback about the PR! :D

Comment thread habitica/Settings.qml Outdated
Comment thread habitica/.gitignore Outdated
Comment thread habitica/Main.qml Outdated
Comment thread habitica/Main.qml Outdated
Comment thread habitica/Main.qml Outdated
Comment thread habitica/Main.qml Outdated
Comment thread habitica/Main.qml Outdated
Comment thread habitica/Main.qml
Comment thread habitica/Main.qml Outdated
@spiros132 spiros132 marked this pull request as draft May 14, 2026 11:49
@Vasqs Vasqs marked this pull request as ready for review May 26, 2026 12:00
@Vasqs Vasqs marked this pull request as draft May 26, 2026 12:00
@Vasqs Vasqs marked this pull request as ready for review June 3, 2026 20:53
The review asked to rely on plugin settings for defaults and cache state, use standard debug logging, and move remaining user-facing runtime text into translations. The Habitica plugin now keeps its cache in pluginSettings, removes the extra cache file setup, and initializes settings edit values through bindings.

Constraint: PR 799 review requested pluginSettings as the cache source instead of separate files

Rejected: Keep FileView plus cache directory | review explicitly asked to avoid the separate cache files

Confidence: high

Scope-risk: narrow

Tested: jq empty habitica/manifest.json habitica/i18n/en.json; git diff --check; local emulation of repository code-quality and manifest checks; user-confirmed runtime test with Habitica credentials
@Vasqs Vasqs force-pushed the feat/habitica-plugin branch from 1298a11 to 438f75f Compare June 3, 2026 21:12
@spiros132 spiros132 merged commit a99e740 into noctalia-dev:main Jun 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants