Skip to content

fix(chat): inline Mighty Deed lookup + enhanced-card formatting (#786)#787

Merged
cyface merged 4 commits into
mainfrom
fix/786-enhanced-card-formatting
Jun 26, 2026
Merged

fix(chat): inline Mighty Deed lookup + enhanced-card formatting (#786)#787
cyface merged 4 commits into
mainfrom
fix/786-enhanced-card-formatting

Conversation

@cyface

@cyface cyface commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Closes #786.

Enhanced attack card formatting (#786)

  • Crit line: drop the redundant Critical! prompt, center the damage/crit/fumble inline-result lines, and keep ( Crit Table III ) glued to the table pill so it never strands across a wrap in a narrow chat sidebar.
  • Remove the weapon damage-formula tag from the card footer — it duplicated the already-shown deed die (e.g. 1d8+d3+1) and read as clutter.

Mighty Deed: inline lookup instead of a "Roll Deed" button

The deed die is rolled as part of the attack, so picking a Mighty Deed table is a lookup of the existing result, not a new roll:

  • Replace the Roll Deed button with a Choose Deed table picker (nothing preselected, shown only on a successful deed ≥ 3).
  • Picking a table renders the looked-up result inline beneath the picker — no new roll, no separate chat message.
  • The choice persists on the message (dcc.deedSelectedTable, author/GM-editable) so it's shared with other viewers and survives the card re-rendering.
  • New DCC.MightyDeedChooseTable key translated across all 7 languages.

Docs

  • Remove the completed dcc-core-lib refactor docs (7-phase plan, progress/session-start/slice-backlog scaffolding, per-phase logs, CLASS_DECOMPOSITION/SCHEMA_SLIMMING records, two landed-fix notes); scrub broken links and stale branch mentions from the surviving guides.
  • CLAUDE.md: drop the obsolete refactor-slice authorization/testing section; add a general "update tests (unit + E2E) with the code" rule.

Testing

  • Unit: 1952 pass.
  • dcc-qol: 46 pass — it uses only the public game.dcc.buildMightyDeedPrompt / attachMightyDeedListeners API, so it picks up the new picker transparently.
  • E2E: all 4 mighty-deeds specs pass; the broader suite is green except enhanced-attack-card and weapon-range, which fail only because dcc-qol is enabled in the local test world (it suppresses the system enhanced card and overrides range handling). weapon-range is code untouched by this PR — confirming the failures are environmental, not regressions; they reproduce on main with dcc-qol on.

🤖 Generated with Claude Code

cyface and others added 4 commits June 26, 2026 09:55
The enhanced attack card's crit-result and Mighty Deed prompt rows read
poorly in a narrow chat sidebar:

- The crit line showed a redundant double label ("Critical!" prompt +
  "Crit Result") and, when it wrapped, stranded the parentheses across
  lines ("… 3 (" / ") …"). Drop the redundant "Critical!" prompt and
  wrap "(<crit table link>)" in a nowrap span so the parens stay glued
  to the table pill and wrap as one unit.
- Center the damage/crit/fumble inline-result lines (previously only
  centered in compact mode) and the deed prompt so they line up with the
  card's otherwise-centered body instead of hugging the left margin.

Verified before/after against the real compiled CSS + Foundry core pill
styles at sidebar widths (185-300px).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…786)

The deed die is rolled as part of the attack, so picking a Mighty Deed
table is a lookup of the existing result, not a new roll:

- Replace the "Roll Deed" button with a "Choose Deed" table picker
  (nothing preselected). Picking a table looks the deed die result up and
  renders it inline beneath the picker — no new roll, no separate chat
  message. The choice persists on the message (author/GM-editable) so it
  is shared with other viewers and survives the card re-rendering.
- Only the table picker is offered, and only on a successful deed (the
  data layer already gates deedTables on deedDieRollResult > 2).
- Add DCC.MightyDeedChooseTable across all seven languages.
- Drop the weapon damage-formula tag from the enhanced-card footer; it
  duplicated the already-shown deed die and read as clutter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- mighty-deeds.spec.js: assert the new deed UX — no "Roll Deed" button,
  a "Choose Deed" placeholder with nothing preselected, the looked-up
  result rendered inline on the same card (no new chat message), the
  persisted dcc.deedSelectedTable flag, and that the pick + result survive
  a re-render. Drop the old button-click / separate-message assertions.
- adapter-dispatch.spec.js: rename the leftover "NPC Skill InheritDie"
  fixture to the "P1 " prefix so the describe's beforeEach/afterEach actor
  sweep deletes it (it had been accumulating in the world every run).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The dcc-core-lib adapter refactor landed on main, so its working docs are
obsolete:

- Delete the 7-phase plan (ARCHITECTURE_REIMAGINED.md), the progress /
  session-start / slice-backlog scaffolding, the per-phase progress logs,
  the CLASS_DECOMPOSITION and SCHEMA_SLIMMING design records, and the two
  landed-fix notes.
- Scrub the resulting broken doc-to-doc links and neutralize stale
  refactor-branch mentions in the surviving guides (EXTENSION_API,
  PROGRAMMATIC_ACTOR_CREATION, TESTING, PRERELEASE_PROCESS, README), and
  fix a now-false claim in PRERELEASE_PROCESS (the vendor dir ships on
  main now, so any build includes it).
- CLAUDE.md: drop the obsolete refactor-slice standing authorization and
  the Refactor-slice testing-requirements section; add a general "update
  tests (unit + E2E) with the code, every branch" rule; remove the
  deleted docs from the doc index.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cyface cyface merged commit b100091 into main Jun 26, 2026
4 checks passed
@cyface cyface deleted the fix/786-enhanced-card-formatting branch June 26, 2026 17:43
cyface added a commit that referenced this pull request Jun 26, 2026
Follow-up to removing the dcc-core-lib refactor docs (#787): reword the
comments that pointed at the deleted docs (ARCHITECTURE_REIMAGINED,
00-progress, CLASS_DECOMPOSITION, SCHEMA_SLIMMING, SPELL_CHECK_LABEL_
OVERRIDE) so they describe the point inline instead of citing a file that
no longer exists. Comment-only; no behavior change.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Formatting of qol custom card

1 participant