Skip to content

Test/e2e coverage expansion - #396

Merged
failerko merged 4 commits into
mainfrom
test/e2e-coverage-expansion
Jul 24, 2026
Merged

Test/e2e coverage expansion#396
failerko merged 4 commits into
mainfrom
test/e2e-coverage-expansion

Conversation

@failerko

@failerko failerko commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added creative-mode story creation without requiring a lead entity.
    • Added draft saving and resume support, including promotion to active stories.
    • Added reader controls for editing, canceling, undoing, redoing, and rolling back entries.
    • Added composer modes for different response styles.
    • Added retry and dismiss actions when narrative generation fails.
  • Bug Fixes

    • Prevented story creation when no usable embedder is available.
    • Improved recovery from interrupted narrative generation.

failerko and others added 4 commits July 24, 2026 03:17
mock-llm gains one-shot failNextNarrative (500) and holdNextNarrative/releaseNarrative (held stream) for the failure and cancel specs; the duplicated window.aventurasDb bridge read is lifted into harness/db.ts as queryApp and adopted by the turn/classifier/wizard specs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
reader.ts centralizes composer/mode/entry-row/menu/rollback locators (EntryCard's hardcoded-English action labels live here, per triage); wizard.ts adds the embed-gate title and save-draft; create-story.ts adds createCreativeStory.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds nine packaged specs — creative create, resume-draft promotion, embedder-gate block, undo/redo, edit, rollback, failure-then-retry, cancel mid-turn, composer modes — each driving through the UI and asserting via the DB bridge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
testing.md notes failNextNarrative/holdNextNarrative in the Mock LLM section; triage narrows the backfill item to what remains (opening-only turn, config surfaces, regenerate, blocked hydration-failure) and logs the EntryCard i18n debt.

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

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 573eec6e-61a3-43be-b719-ecde1d1246a0

📥 Commits

Reviewing files that changed from the base of the PR and between b62ac05 and dcddba1.

⛔ Files ignored due to path filters (2)
  • docs/implementation/triage.md is excluded by !docs/**
  • docs/testing.md is excluded by !docs/**
📒 Files selected for processing (17)
  • e2e/flows/create-story.ts
  • e2e/harness/db.ts
  • e2e/harness/mock-llm.ts
  • e2e/locators/reader.ts
  • e2e/locators/wizard.ts
  • e2e/tests/classifier.spec.ts
  • e2e/tests/reader-cancel.spec.ts
  • e2e/tests/reader-composer-modes.spec.ts
  • e2e/tests/reader-edit.spec.ts
  • e2e/tests/reader-failure-retry.spec.ts
  • e2e/tests/reader-rollback.spec.ts
  • e2e/tests/reader-undo-redo.spec.ts
  • e2e/tests/turn.spec.ts
  • e2e/tests/wizard-creative.spec.ts
  • e2e/tests/wizard-embedder-gate.spec.ts
  • e2e/tests/wizard-resume-draft.spec.ts
  • e2e/tests/wizard.spec.ts

📝 Walkthrough

Walkthrough

The PR expands E2E infrastructure with app-database queries and controllable mock narrative streams, adds centralized reader and wizard locators, and introduces coverage for reader interactions and story wizard creation, gating, and draft resumption.

Changes

E2E harness and assertion infrastructure

Layer / File(s) Summary
App database assertion bridge
e2e/harness/db.ts, e2e/tests/classifier.spec.ts, e2e/tests/turn.spec.ts, e2e/tests/wizard.spec.ts
Adds queryApp and replaces local renderer database wrappers in existing tests.
Mock narrative stream controls
e2e/harness/mock-llm.ts
Supports one-shot failures, held SSE streams, manual release, and cleanup of held responses.

Reader interaction coverage

Layer / File(s) Summary
Reader locator map
e2e/locators/reader.ts
Centralizes locators for composer, entry actions, failures, rollback, and undo/redo controls.
Reader turn and failure flows
e2e/tests/reader-composer-modes.spec.ts, e2e/tests/reader-cancel.spec.ts, e2e/tests/reader-failure-retry.spec.ts
Covers mode wrapping, canceling held generation, and retrying failed narrative generation.
Reader editing and history operations
e2e/tests/reader-edit.spec.ts, e2e/tests/reader-rollback.spec.ts, e2e/tests/reader-undo-redo.spec.ts
Covers editing, rollback deletion, undo, and redo persistence.

Story wizard coverage

Layer / File(s) Summary
Creative story creation flow
e2e/flows/create-story.ts, e2e/locators/wizard.ts, e2e/tests/wizard-creative.spec.ts
Adds creative-story creation support and verifies an active story with no branch entities.
Wizard gate and draft lifecycle
e2e/tests/wizard-embedder-gate.spec.ts, e2e/tests/wizard-resume-draft.spec.ts
Verifies embedder gating prevents commits and saved drafts are promoted without duplicate stories.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Poem

A rabbit queued streams in a neat little row,
While stories learned when to halt and when to go.
Drafts turned active, entries danced back,
Readers tried modes on the narrative track.
“Hop!” said the bunny, “the tests now know why!”

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is related but too generic to clearly describe the main changes. Rename it to mention the specific e2e flows added, such as reader interactions and wizard creative-mode coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@failerko
failerko merged commit 9a4cb4d into main Jul 24, 2026
4 checks passed
@failerko
failerko deleted the test/e2e-coverage-expansion branch July 24, 2026 01:56
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