Skip to content

Remove dead disable prop from post detail Page - #526

Merged
rahulwalunje merged 1 commit into
mainfrom
issues/525-post-page-disable-prop
Nov 18, 2026
Merged

rahulwalunje merged 1 commit into
mainfrom
issues/525-post-page-disable-prop

Conversation

@codente

@codente codente commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Removes a disable prop that no component consumes, so React stopped forwarding it to the DOM and logging a warning on every render of the post detail screen:

Warning: Received `false` for a non-boolean attribute `disable`.

Cause

src/system/ui/pages/post/index.js passed disable={ item.hasLock } to <Page>. Neither our Page wrapper (src/system/ui/pages/index.js) nor FLUID's Page (@beaverbuilder/fluid) declares a disable prop — both spread ...rest onto the root element, so it reached the div and React rejected it as an unknown attribute.

The prop was dead code, a leftover from 65ec165 ("Added back post lock logic that was lost in merge"). Post-lock behavior is unchanged and still comes from:

  • <LockView isLock={ item.hasLock }> → fl-asst-lock-view applies pointer-events: none; opacity: 0.2 to the form
  • the Layout.Message alert shown when item.hasLock
  • the false === item.hasLock guard on the footer

Testing

  • Post detail screen renders with no disable warning in the console
  • Lock path verified: alert message, dimmed non-interactive form, and hidden footer all still behave as before
  • eslint clean

One line deleted, no behavior change. The separate findDOMNode is deprecated warning on this screen comes from the third-party react-clipboard.js dependency and is out of scope.

Closes #525

🤖 Generated with Claude Code

Neither our Page wrapper nor FLUID's Page declares a disable prop; both
spread ...rest onto the root element, so disable={ item.hasLock } reached
the DOM and React logged a non-boolean attribute warning on every render
of the post detail screen.

The prop was a leftover from 65ec165 and never did anything. Post lock
behavior is handled by LockView's fl-asst-lock-view styling, the alert
message, and the footer's hasLock guard.

Closes #525

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

@rahulwalunje rahulwalunje 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.

Looks good.

@codente

codente commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Merge Check

State: ready, lane none. Waiting on a test run. Lane none recorded in the sticky only; this repo has not opted into the risk lanes (no risk: labels), and it has no merge: labels either, so this run wrote no labels.

TLDR

Deletes one unused prop so the post detail screen stops logging a React console warning; post locking works exactly as before.

Review

Human review: @rahulwalunje approved at this head (2026-10-07). Clean, no open blockers.

Sanity check

Low risk: right fix. disable has no consumer, and locking is enforced elsewhere.

Sanity check detail

Lane: none. No lane trigger fired: no stored data, no public surface, no dependency, no access-control gate, and no visible change to a surface (the prop never rendered anything).

  • Verified at main: the Page wrapper (src/system/ui/pages/index.js) spreads ...rest onto FLUID's Page, and FLUID 0.7.24's dist has no disable prop, so the attribute only reached the DOM as an unknown attribute.
  • Lock behavior lives in LockView (fl-asst-lock-view), the alert Layout.Message and the footer guard, and none of them changed.
  • The findDOMNode warning from react-clipboard.js is out of scope, as the body says.

Test plan

  1. Open Assistant → Content → any post's detail screen. The console shows no non-boolean attribute \disable`` warning.
  2. Have another user open that post in the WordPress editor (or set its _edit_lock to another user), then reopen the detail screen in Assistant.
  3. The alert message appears, the form is dimmed and can't be clicked, and the Save footer is hidden, exactly as before.
  4. npm test (JS lint) passes.
Agent playbook

Preconditions: the assistant repo built (npm run build) at this head and active on the site; at least two administrators; one published post (<id> below).

  1. npm test. Expect eslint to exit 0.
  2. Navigate to the site's /wp-admin/, open Assistant, then the Content app, and open post <id> (route /fl-content/post/<id>). Expect .fl-asst-form present.
  3. /console?level=error and /console?level=warn. Expect no entry containing non-boolean attribute and disable. The findDOMNode warning from react-clipboard.js is expected and is not a finding.
  4. wp-cli: wp post meta update <id> _edit_lock "$(date +%s):<other_admin_id>". Then GET /wp-json/fl-assistant/v1/posts/<id>: expect hasLock equal to <other_admin_id>.
  5. Reload and reopen post <id> in Assistant. Expect .fl-asst-lock-view .fl-asst-form present with computed pointer-events: none and opacity: 0.2, the alert Layout.Message rendered, and no Save footer.
  6. /dom: expect no disable= attribute on the page root element.
  7. Sweep: wp post meta delete <id> _edit_lock, reopen post <id>, edit the title. Expect the Save footer to appear, no .fl-asst-lock-view, and no new console errors.
Run history
When (UTC) Head State Delta
2026-11-09 6942c4b ready first run, local; human approval reused as the review; marker-only (no risk:/merge: labels in repo)

bb-merge-check · head:6942c4b · state:ready · risk:none

@rahulwalunje
rahulwalunje merged commit a0f30c2 into main Nov 18, 2026
1 check passed
@rahulwalunje rahulwalunje mentioned this pull request Nov 19, 2026
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.

Console warning: Received false for a non-boolean attribute disable on the post detail screen

3 participants