maniator / maniator/verticopolis

[P3] pinned-footer-selector-fails-open: the footer selector is positional, so a new dialog can silently lose its pin

Open
#671 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Deferred from /bmad-code-review of the pinned dialog footer (PR #664, v1.104.0). Blind Hunter finding.

The pinned footer is matched by .modal-box > .modal-actions:last-child, .modal-box > .modal-actions:nth-last-child(2). That is positional rather than semantic, and it fails open in both directions:

  • A dialog that renders two elements after its action row, or that wraps its body in a container div, matches neither arm and silently gets no pinned footer. Nothing fails: the guard test reads the stylesheet, the unit tests run without layout, and only Help, Settings and the schedule dialog have captures. The cost of forgetting is the original data-loss bug returning with a green suite.
  • :nth-last-child(2) means "second from last", not "is a footer". A top-level mid-body action row that happens to sit second-to-last would be pinned as though it were the footer, which is the exact thing the child combinator was added to prevent.

Fix when picked up: make the match semantic. Have the templates opt in (a .modal-footer class or a data- attribute on the row) so a footer is identified by what it is, and a dialog that forgets is detectable rather than silently unpinned. A test can then assert every dialog template that renders actions marks exactly one footer.

/bmad-code-review.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the stylesheet selector and the dialog templates for Help, Settings, and the schedule dialog, then inspect the existing guard and unit tests. Update the templates and selector so the footer is identified semantically, and add coverage asserting every dialog template that renders actions marks exactly one footer.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.