Skip to content

fix(verify): real-Devvit-DOM signal-based detection + working select picker#48

Merged
ComBba merged 1 commit into
mainfrom
fix/verify-script-devvit-dom
May 14, 2026
Merged

fix(verify): real-Devvit-DOM signal-based detection + working select picker#48
ComBba merged 1 commit into
mainfrom
fix/verify-script-devvit-dom

Conversation

@ComBba
Copy link
Copy Markdown
Contributor

@ComBba ComBba commented May 14, 2026

Summary

Iteration on the Phase 1.7b/c verify script after running it against v0.0.44 on r/SocialSeeding (PR #47 first-pass landed the script; this PR makes it actually work against Devvit's real DOM).

End result: `playwright/.auth/verify-phase17b-result.json` reports `"overall": true`, 15/15 step PASS — including:

Three real DOM gaps that needed fixes

None in server code — all in the test harness:

  1. `dump_form()` — Devvit's modal markup doesn't expose a stable `

    ` title or `[slot="description"]`. Previous extraction returned empty strings every time. Added `dialogText` (full text-content of the dialog) as the source of truth for description-style assertions.

  2. Form-type detection — switched from title-text matching to field-name signals:

    • clarify form ⇔ presence of `clarificationTurn`
    • confirm form ⇔ `compiledSummary` + `serializedRule`
    • dashboard onboarding ⇔ "Welcome to vibe-mod" inside `dialogText`
    • manage form ⇔ at least one `action_*` field
  3. clarify-select-pick — the previous `locator('select, faceplate-select').click()` timed out because Devvit renders the select as a Lit element with a different tag (option-click via faceplate-listbox-item works). Replaced with a single `page.evaluate` that scopes by the field's wrapper, tries native `` first, then any option-like child (`faceplate-radio-input`, `faceplate-listbox-item`, `[role=option]`). Test plan [x] Ran against r/SocialSeeding v0.0.44 — 15/15 PASS [x] No source/server change — script-only [x] No new dependencies Why this matters for publish Goal-driven verification confirmed the new UX surfaces actually render and respond as designed in production Devvit, not just in unit tests. `devvit publish --public` is now a much safer bet for D-9 (2026-05-18). 🤖 Generated with Claude Code

… DOM

Iteration on the Phase 1.7b/c verify script after running it against the
v0.0.44 install on r/SocialSeeding. Three real DOM gaps surfaced — none
in server code, all in our test harness.

## Server: 14/14 PASS — production confirmed

Surfaced live in this script's last run:
  - Clarify modal renders the suggestedAnswers `select` (PR #43)
  - clarificationTurn carrier + "(Round X of N)" (PR #44)
  - composeConfirmForm with compiledSummary + serializedRule (PR #44)
  - Save toast: 'Compiled rule "X". → post: modqueue. Dry-run started…'
  - Dashboard onboarding card + token cost line (PR #44 Tier 2/3)
  - Manage rules menu with per-rule action_* select fields (PR #44)

## Script changes

1. **dump_form()** — Devvit's modal markup doesn't expose a stable `<h2>`
   title or `[slot="description"]`, so the previous extraction returned
   empty strings on every form. Added `dialogText` (full text-content of
   the dialog) as the source of truth for description-style assertions.

2. **Form detection** — switched from title-text matching to **field-name
   signals**:
   - clarify form ⇔ presence of `clarificationTurn`
   - confirm form ⇔ `compiledSummary` + `serializedRule`
   - dashboard onboarding ⇔ "Welcome to vibe-mod" inside dialogText
   - manage form ⇔ at least one `action_*` field

3. **clarify-select-pick** — the previous picker called
   `locator('select, faceplate-select').click()` which timed out (Devvit
   renders the select as a Lit element with a different tag). Replaced
   with a single `page.evaluate` that scopes by the field's
   data-field-name wrapper, tries native `<select>` first, then any
   option-like child (faceplate-radio-input, faceplate-listbox-item,
   role=option). Successfully picks "Under 24 hours" in production.

## Verified behaviour
\`playwright/.auth/verify-phase17b-result.json\` shows
\`"overall": true\` and 15/15 step PASS.
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@ComBba has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 37 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e963824c-d53d-4327-9690-a1f6a7a73526

📥 Commits

Reviewing files that changed from the base of the PR and between 7660b61 and c1095e9.

📒 Files selected for processing (1)
  • scripts/chrome-reddit-verify-phase17b.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/verify-script-devvit-dom

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the Reddit verification script by improving the robustness of form data extraction and interaction within the Devvit environment. Key changes include the addition of a dialogText field to capture full modal content, transitioning from unstable title-based detection to field-name signals for identifying forms, and implementing a more sophisticated DOM-based interaction strategy for selection controls. A review comment correctly identified a redundant code block that would result in a NameError due to the use of undefined variables.

Comment on lines +385 to +394
# Mark PASS when we successfully drove some select-like control.
# The form's defaultValue already pre-selects opts[0], so even
# if our picker only reaffirmed it the next compile will see
# this value — that's still a real round-trip.
if 'clarify-select-pick' not in {s.name for s in report.steps}:
report.add(StepResult(
"clarify-select-pick",
bool(picker_ok),
f"picker_ok={picker_ok} picked_value={picked_val!r}",
))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This block is redundant and contains logic errors. A StepResult with the name "clarify-select-pick" is already added at line 378, which means the condition at line 389 will always evaluate to False. Furthermore, the variables picker_ok and picked_val are not defined in this scope, which would result in a NameError if this code were ever reached. This entire block should be removed.

@ComBba ComBba merged commit 92ff299 into main May 14, 2026
2 checks passed
@ComBba ComBba deleted the fix/verify-script-devvit-dom branch May 14, 2026 06:54
ComBba added a commit that referenced this pull request May 15, 2026
fix(verify): real-Devvit-DOM signal-based detection + working select picker
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.

1 participant