Keep empty Declare moves disabled - #557
Conversation
📝 WalkthroughWalkthroughScreenTable's Declare flow now derives composerAction and trimmed draftText, computes explicit Declare gating/labels (declareNeedsDraft, declareDisabled, declareTitle, declareAriaLabel), and sendAction shows a "Type a move first" toast and focuses the input on empty submission. App centralizes hash routing via openWorlds helpers and a memoized navigate(). ChangesRouting and deep-linking
Declare Validation and State Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@viewer/openworlds/screen-table.jsx`:
- Around line 700-711: The tooltip/ARIA must reflect every disabled reason:
update the declareTitle and declareAriaLabel logic to branch on declareDisabled
reasons (use declareDisabled combined with specific flags) rather than only
pendingStuck/declareNeedsDraft; specifically, add cases for
!composerAction?.available (show a composing/narrating unavailable message using
composerMode.label), pendingActive (show a pending/composing… label), and
appStatusBlocksPlay (show an app-blocked message), while preserving the existing
pendingStuck and declareNeedsDraft messages and fallback to DECLARE_HINT;
reference declareDisabled, declareTitle, declareAriaLabel, declareNeedsDraft,
pendingStuck, pendingActive, appStatusBlocksPlay, composerAction, composerMode,
and DECLARE_HINT when making the changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8aedab8c-abbf-4e7e-871c-ad36b21a1748
📒 Files selected for processing (2)
viewer/openworlds/screen-table.jsxviewer/tests/test_openworlds_static.py
Summary
Verification
python3 -m pytest viewer/tests/test_openworlds_static.py::OpenWorldsStaticRouteTests::test_openworlds_table_action_buttons_select_declare_mode -qpython3 -m pytest viewer/tests/test_openworlds_static.py::OpenWorldsStaticRouteTests::test_openworlds_hash_aliases_match_primary_nav_labels -qpython3 -m pytest viewer/tests/test_openworlds_static.py -qNotes
/movesubmitter.Licensing / CLA