Skip to content

fix(rules): show counterparty/series name in rule detail + lift icon contrast#1919

Merged
canalesb93 merged 1 commit into
mainfrom
claude/awesome-lovelace-e2xenl
Jun 24, 2026
Merged

fix(rules): show counterparty/series name in rule detail + lift icon contrast#1919
canalesb93 merged 1 commit into
mainfrom
claude/awesome-lovelace-e2xenl

Conversation

@canalesb93

@canalesb93 canalesb93 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Fixes #1916.

Problem

Two issues on the rule detail "Then" card, both visible in the filed screenshot:

  1. Opaque surrogate instead of name. The card rendered Assign to counterparty wvmXi45D instead of Assign to counterparty Netflix. When an assign_counterparty / assign_series action binds an existing entity by short_id, no inline name is stored on the action, and ruleActionEntityName fell straight back to the surrogate.
  2. Near-invisible counterparty icon. The icon tile used bg-secondary/10 + text-secondary. In the theme, --color-secondary is oklch(0.971 …) — nearly white in light mode (and nearly the surface color in dark mode), so the store glyph washed out in both themes.

Fix

  • Name resolution. RuleDetailPageHandler now resolves each bind-by-short_id action to the live entity's display name (via GetCounterparty / GetSeries — cheap, a rule carries only a handful of actions) and passes it through the new RuleDetailProps.ActionEntityNames map. The templ helper now prefers inline name → resolved name → short_id as a last resort, so a deleted/unresolvable entity still shows something rather than an empty label.
  • Icon contrast. Switched the counterparty tile to the chromatic bg-info/10 + text-info, matching the visibility of the assign_series (primary) tile and reading clearly in both light and dark themes.

This is read-path display only — provider data and the stored action remain untouched, consistent with the surrogate-first identity model (name is a display fallback).

Validation

  • go build ./..., go vet ./... clean.
  • New unit tests in rule_detail_types_test.go cover inline-name, short_id-resolution, and the unresolved fallback (go test ./internal/templates/components/pages/ passes). The one unrelated failure in the suite is internal/agent process-group reaping, untouched by this change.
  • Reproduced the exact bug end-to-end: inserted a Netflix counterparty, authored a rule binding it by short_id only, and rendered the detail page. Screenshot of the fixed state below — the card now reads Assign to counterparty Netflix with a clearly-visible blue store icon:

rule detail — after fix

🤖 Generated with Claude Code

…il, lift icon contrast

The rule detail "Then" card rendered "Assign to counterparty wvmXi45D"
instead of "Assign to counterparty Netflix" whenever an
assign_counterparty / assign_series action binds an existing entity by
short_id (no inline name stored). ruleActionEntityName fell straight
back to the surrogate.

Resolve the short_id to the live entity's display name in the rule
detail handler (cheap — a rule carries a handful of actions) and pass it
through RuleDetailProps.ActionEntityNames; the templ helper now prefers
inline name → resolved name → short_id as a last resort.

Also fix the near-invisible counterparty icon: the tile used
bg-secondary/10 + text-secondary, and --color-secondary is ~white in
light mode (and ~dark in dark mode), so the store glyph washed out in
both themes. Switch to the chromatic bg-info/10 + text-info, matching
the visibility of the assign_series (primary) tile.

Fixes #1916

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FBR5SK8z4L71JAHcA3DdAH
@canalesb93 canalesb93 enabled auto-merge (squash) June 24, 2026 06:34

Copy link
Copy Markdown
Owner Author

Screenshot of the fix (rule detail page, after) — the "Then" card now reads Assign to counterparty Netflix with a clearly-visible blue store icon:

&lt;img src="https://bb-artifacts.exe.xyz/f/6991c873c7ffcf80.jpg" width="800" alt="rule detail — after fix"&gt;


Generated by Claude Code

@canalesb93 canalesb93 merged commit 527d981 into main Jun 24, 2026
8 checks passed
@canalesb93 canalesb93 deleted the claude/awesome-lovelace-e2xenl branch June 24, 2026 06:37

Copy link
Copy Markdown
Owner Author

Screenshot link (clean — the previous comment's raw <img> got HTML-escaped by the write path, which strips raw HTML and the ! from Markdown image syntax alike, so it can't inline-render here):

After fix → https://bb-artifacts.exe.xyz/f/6991c873c7ffcf80.jpg

The "Then" card now reads Assign to counterparty Netflix (was the surrogate wvmXi45D) with a clearly-visible blue store icon. Full evidence is in the PR description.


Generated by Claude Code

canalesb93 added a commit that referenced this pull request Jun 24, 2026
Pull in main (#1907#1919). Two changes interact with this PR:

- #1918 fully removed series tags (AddSeriesTag/RemoveSeriesTag service
  methods gone). Reverted this PR's update_series tag fold: update_series
  is back to name/type only, and the tags_to_add/tags_to_remove input +
  handler loops are removed. Series no longer have a tag dimension.
- #1913 added four series/counterparty workflow preset prompts written
  against main's older tool surface. Scrubbed their stale refs to match
  the consolidated tools: breadbox://overview → get_overview;
  batch_create_rules → create_transaction_rule rules array; set_series_type
  / split_series / review_series / explain_series_candidates (all removed
  upstream) → update_series / unlink_series_transactions / get_series.

Resolved the docs/mcp-tools-reference.md conflict by taking main's
series-unlink description (no tags). The counterparty create→assign fold
and unlink rename from the prior commit are preserved.

Verified: go build ./..., go vet ./..., and the full internal/mcp
integration suite green on a clean DB.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7qg4TN9ZPcHsXR714UrjG
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.

[Bug] Counterparty and Series rule actions are shown with ID instead of name in rule details

2 participants