feat: show active rotating goal in compact dock UI (#148)#162
Merged
Conversation
Add GoalLabel node to the left column header between Subtitle and ResourceLabel. Wire up render_goal() in render_all() to display the current rotating goal with progress. Formats match the spec examples: Goal: Reach 10 wood Goal: Build Garden (3/5) Goal: Finish a build ✓ Hides when no active goal exists. Autowrap + compact font size keeps it from clipping in bottom or side dock layouts.
There was a problem hiding this comment.
AI Automated Review
Analysis engine: MiniMax@https://litellm.jory.dev/v1 (anthropic)
Recommendation: Approve
This is a small, well-scoped implementation of the rotating-goal display for the compact dock UI. The diff is internally consistent, follows existing scene/script conventions, and matches the linked issue's examples and acceptance criteria.
Change-by-change findings
scenes/main.tscn (+8)
- Adds a
GoalLabelof typeLabelunderBackdrop/Margin/Root/Left, placed between the existingSubtitleandResourceLabelnodes (matches the PR description and the Left-column header pattern). - Uses
unique_name_in_owner = trueso the script can reference it via%GoalLabel, consistent with the other Left-column labels. autowrap_mode = 3(AUTOWRAP_WORD_SMART) andtheme_override_font_sizes/font_size = 13mirror the Subtitle/ResourceLabel pattern and directly address the "Bottom and side dock layouts do not clip" acceptance criterion.modulate = Color(1, 1, 1, 0.75)is a touch brighter than Subtitle's 0.7, which is a reasonable visual hierarchy for an actionable hint; not a regression.
scripts/main.gd (+37)
- Adds
@onready var goal_label: Label = %GoalLabelnext to the existing@onreadyreferences for the Left-column labels — consistent placement. - Wires
render_goal()intorender_all()afterrender_worker_overlay()and beforerender_sidebar(), keeping render order logical. render_goal():- Guards
is_instance_valid(goal_label)(consistent with other renderers). - Sets
visible = falseandtext = "Goal: —"whenactive_goal.is_empty()— matches the "Hides when no active goal exists" behavior claimed in the PR. - Uses a
matchonRotatingGoal.GOAL_TYPE_*constants to format per the issue's examples:GOAL_TYPE_RESOURCE→Goal: Reach %d %s(e.g.,Goal: Reach 5 food)GOAL_TYPE_BUILD→Goal: Build %swithcap(build_kind)(e.g.,Goal: Build Garden)GOAL_TYPE_BUILD_COMPLETE→Goal: Finish a build
- Progress is appended as
(%d/%d)only whentarget > 0andprogress > 0and the goal is not yet complete; complete goals get a✓suffix — directly addresses "Progress is shown when useful." - Reuses
RotatingGoal.is_goal_complete(active_goal)so completion detection stays in the data model (no duplicated logic).
- Guards
Linked Issue Fit (#148)
| Issue AC | Status |
|---|---|
| Active goal text appears in compact UI | Met — render_goal() updates %GoalLabel each tick |
| Progress is shown when useful | Met — (%d/%d) only when progress > 0, target > 0, not complete |
| Bottom and side dock layouts do not clip | Met in code — autowrap + 13 px font; visual confirmation recommended but not blocking |
| Layout tests are added/updated if applicable | Not added, but the existing tests/ suite does not test any other Left-column label renderers (ResourceLabel, Subtitle, StatusLabel, ActivityLabel), so a new UI test would actually be inconsistent with repo conventions. The "if applicable" qualifier is satisfied. |
| Link back to #131 and #135 | Conceptually met — uses RotatingGoal from scripts/rotating_goal.gd, which already references misospace/windowstead#142 and #131 at line 3 of that file. The PR description also names both issues. No new code comment is strictly required. |
The PR also correctly avoids the two out-of-scope items the issue called out: no reward preview (left to #141) and no large goal panel.
Standards Compliance (AGENTS.md)
- "Bottom dock is the primary mode" — the label is added to the shared Left column used by both anchor families, so it shows in both; primary mode is unaffected.
- "The world strip is the product" / "glanceable, low-attention" — the goal line is a single short Label, not a panel.
- "Menus should be temporary popup overlays, not persistent sidebars" — no panel/menu added; just a label.
- "Separate layout assumptions for bottom vs vertical mode" — the label sits in a shared VBox with autowrap, so it adapts without requiring per-anchor math.
- No regressions against the "Avoid" list (no sidebar UI, no resized-version-of-each-other behavior, no menu-hides-world).
Evidence Provider Findings
None configured; nothing to evaluate.
Tool Harness Findings
The harness reported 0 planned requests and a planning warning (Could not parse planning response as JSON). This appears to be a harness/parse issue, not a finding against the PR — no blocker-level evidence was produced.
Unknowns / Needs Verification
- Visual clipping in bottom vs side dock modes: the code uses the same styling approach as the other Left-column labels, but the PR was not visually validated in the corpus. A quick editor launch (per
CONTRIBUTING.md's "Smoke test before pushing") would confirm no clipping, but I would not block on this since the pattern matches neighbors exactly. - Edge case for unknown
goal_type: ifactive_goal["type"]is not one of the three known constants,goal_textstays empty and only the optional progress suffix is appended (or the ✓ for already-complete goals). This produces a near-empty line in an edge case that the data model should never produce. Low risk; consider a final_:branch with a defensive fallback in a follow-up. - No tests added: as noted above, this is consistent with the rest of the Left-column label code, so not blocking.
Sources
- PR diff:
scenes/main.tscn,scripts/main.gd - Linked issue: #148 (
ux: show active rotating goal in compact UI) - Repository impact scan: confirmed
RotatingGoalconstants used inscripts/rotating_goal.gdandactive_goalinscripts/main.gd(lines 79, 722–723, 1070–1073, 1547+) - Repository history: HEAD commit
cd9f623matches PR title; previous goal-related work is#142(data model) and#145(rotation), both already merged - Standards:
AGENTS.md(UX constraints, validation, bottom-dock-first polish)
This was referenced Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #148
Add GoalLabel node to the left column header between Subtitle and ResourceLabel. Wire up render_goal() in render_all() to display the current rotating goal with progress.
Formats match the spec examples:
Hides when no active goal exists. Autowrap + compact font size keeps it from clipping in bottom or side dock layouts.
Acceptance criteria: