← Back to Pull requests

Preserve streaming prose and table geometry at finalization #940

Merged
scottopell merged 24 files (1306 lines) on Oct 18, 2026 14:37 UTC
View on GitHub
scottopell scottopell commented on Oct 17, 2026 16:05 UTC
Author

Summary


Keep assistant prose and tables stable when a streamed response becomes a saved message. Fix action-chrome displacement, streaming-only desktop table expansion, and completed code-fence shells that moved the actual ACL reply by57px.

Changed


  • Reserve consistent assistant toolbar space and prose padding before and after finalization; preserve Copy/Review behavior, suppression and occurrence identity without scroll compensation.

  • Remove streaming-only bilateral table expansion while retaining semantic tables, cell content and table-local horizontal scrolling. Parsing and sanitization are unchanged.

  • Match completed ordinary code-fence shells to finalized Markdown, preserve native unlabelled-code whitespace, and leave Mermaid's dedicated rendering ownership unchanged.

  • Exercise the full reported ACL reply at cumulative partial-header, delimiter, backtick, cell and trailing-prose boundaries using real streaming/finalized components.

  • Keep exact-source browser regressions in normal hosted CI; historical causal controls remain in retained evidence, not as a permanent dependency on old source.
  • Qualification


    Exact head ea3d2466c3d9c93b3b42a0d31b0acaa6ac23a5d5: independent source and geometry review APPROVE. Hosted Chromium: 112 chrome cases, 63 incremental table samples with zero breakouts, and 20 real-transcript reader/pinned cases. Across720 delayed observations, reader-position/scrollTop drift and pinned-bottom gap are all 0px, including the actual ACL reply. UI/specs, Clippy and E2E checks passed; the full Rust check is still running in 39050089215.

    Exact-head evidence artifact · Failed-before causal receipts

    Tracks task46009/#780 and the separately commissioned streaming-table report. This is source/fixture qualification, not deployed or physical-iPhone acceptance. #933 typed-link integration and installed-PWA no-op diagnosis remain separate. Global owns merge/deploy after required checks pass.

    Diff: 1306 lines (+1244 / -62) across 24 files Reviewer: scottopell Review duration: 1351m
    All Vouch review confidence checks passed
    Residual risk 0.12 = Change Risk (0.86) × (1 − Review Confidence (0.86)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.86 · 1306 lines diff across 24 files
    0.86
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.97 · 5 substantive comment(s)
    0.97
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    86%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Self Review self_review
    0.140
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    8 items
    scottopell scottopell commented on Oct 17, 2026 16:31 UTC
    Author

    Browser repro and correction evidence

    Run 39049027282, exact source 27436bbf98650296210c1485efad5a18c4cc7f3f, retained artifact12107300840:

  • Causal old-renderer control reproduces geometry displacement in 6/8 mobile cases and 4/8 desktop cases.

  • Causal old-table-CSS control reproduces bilateral breakout: at1280 viewport, table wrapper1240px versus prose784px; finalized reference784px.

  • Fixed-source 112 chrome cases pass; 63 incremental table samples, zero breakouts. Full ACL reply, partial header/separator/backtick/cells and completed table while tail is still streaming.

  • Real MessageList/store reader and pinned controls pass the first four375px prose/retry scenarios. The full ACL reply then fails honestly with +57px paragraph drift and unchanged scrollTop.
  • Diagnosis of that remaining failure: two completed streaming code fences omit finalized Markdown's outer PRE shell. DOM and bounds show +28.5px after each fence; it is separate from table sizing. Commit916eb4147 corrects ordinary fence shells, retains memoization and native unfinished rendering; stricter browser assertions now include table/paragraph vertical position. Run39049420660 is checking this. Independent review also caught Mermaid-specific shell ownership; a follow-up preserves its existing dedicated renderer instead of propagating finalized nested PRE structure. Fifty focused code/table/performance tests pass after that review correction.

    Still draft; no full browser success/merge/deploy claimed. Historical baseline swapping will be removed from the permanent CI path after retaining these causal receipts, avoiding a future dependency on old renderer APIs. Final fixed-source CI will remain.

    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Oct 17, 2026 16:45 UTC
    Bot

    <!-- codex-pull-request-review-summary -->
    <!-- codex-review-state:v1 {"code_review":{"commit_sha":"ea3d2466c3d9c93b3b42a0d31b0acaa6ac23a5d5","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} -->

    Codex Review Summary

    This comment shows the latest Codex review activity on this pull request.

    | Review | Status | Commit | Review trigger |
    | --- | --- | --- | --- |
    | 📝 Code Review | ✅ Completed <relative-time datetime="2026-10-17T16:49:51.649277Z">2026-10-17T16:49:51.649277Z</relative-time> | ea3d246 | Draft marked ready |

    <details> <summary>ℹ️ About Codex in GitHub</summary>
    <br/>

    Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review

  • Mark a draft as ready

  • Comment "@codex review" or "@codex security review".
  • Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

    </details>

    scottopell scottopell commented on Oct 17, 2026 16:47 UTC
    Author

    Exact-head source + browser qualification: APPROVE

    Head: ea3d2466c3d9c93b3b42a0d31b0acaa6ac23a5d5. Independent read-only agent source review and a separate artifact review both approve. This is not a GitHub external-reviewer approval or deployed acceptance.

    Hosted run39050089215, geometry job117447047845 SUCCESS; artifact12107980084:

  • Recorded source HEAD and three SHA256 source entries independently match current HEAD blobs.

  • 14 geometry scenarios ×8 cases =112: identical streaming/final content, paragraph and downstream geometry; user geometry unchanged; no browser errors.

  • 63 incremental table samples:0 breakouts/failures/errors. Completed-table checkpoints retain semantic markup/data, table/cell geometry and paragraph/table relative positions. Full actual ACL reply is not replaced with a short surrogate.

  • 20 real-store/MessageList cases ×36 delayed observations =720: reader paragraph Y and scrollTop deltas0px; pinned-bottom gap0px. Includes actual ACL reply at375/1280, normal/retry and full/compact prose cases.

  • Historical failing controls remain linked in comment6236682183. Permanent CI runs only current source; no historical API compatibility dependency.
  • UI/specs, Clippy and E2E are green. Full Rust CI is still running at this receipt; do not label the entire run green yet. PR is now ready for review. Current fetched main ea5df4b473ebd62ee8edd59daad9e43a119e9630 has no changes since base4894426 in touched production renderer/CSS/CI seams; no gratuitous rebase performed.

    Next: Global assesses this packet and merges the exact head after required checks pass, then coordinates the sole host deployment. This lane has not merged/deployed. Chromium source-fixture qualification does not claim WebKit, physical iPhone, installed-PWA navigation, or original-scroll ledger acceptance. #933 remains separately Global-owned.

    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on code on Oct 17, 2026 16:49 UTC
    Code Review
    .github/workflows/ci.yml:1
    @@ -254,6 +254,65 @@ jobs:
           - name: ./dev.py check (ui/specs)
             run: ./dev.py check --lanes tsc,ui-lint,vitest,ast-grep,allium,spec-shape,spec-anchors,pkglock
     
    +  check-finalization-geometry:
    +    name: check (assistant finalization geometry)
    +    needs: plan_check

    <sub><sub>!P2 Badge</sub></sub> Include geometry checks in main-failure aggregation

    When this new job is the only failure on a push to main, neither downstream monitoring job observes it: both notify-main-failure and close-main-failure list only the existing jobs in needs, so this result is absent from needs.*.result. The workflow can therefore remain red without opening the failure issue—or even close an existing issue as “Green again.” Add check-finalization-geometry to both downstream needs lists.

    Useful? React with 👍 / 👎.

    <!-- codex-code-review-finding:v1 -->

    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Oct 17, 2026 16:49 UTC
    Reviewer

    <!-- codex-review-receipt:v1 -->

    💡 Codex Review

    Here are some automated review suggestions for this pull request.

    Reviewed commit: ea3d2466c3

    <details> <summary>ℹ️ About Codex in GitHub</summary>
    <br/>

    Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review

  • Mark a draft as ready

  • Comment "@codex review".
  • If Codex has suggestions, it will comment; otherwise it will react with 👍.

    Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

    </details>

    scottopell scottopell commented on code on Oct 17, 2026 18:46 UTC
    Code Review
    .github/workflows/ci.yml:1
    @@ -254,6 +254,65 @@ jobs:
           - name: ./dev.py check (ui/specs)
             run: ./dev.py check --lanes tsc,ui-lint,vitest,ast-grep,allium,spec-shape,spec-anchors,pkglock
     
    +  check-finalization-geometry:
    +    name: check (assistant finalization geometry)
    +    needs: plan_check

    Fixed in 8095cfcb3bc4ea9942d8f1f4e9f9f0115b047f83: both notify-main-failure and close-main-failure now depend on check-finalization-geometry. Light regression rejects old needs and validates geometry-only failure/cancelled/skipped/success aggregation in both corrected lists; independent exact-commit review APPROVE, no cycle. Successor hosted CI is being qualified; not claiming prior ea3 CI covers this head.

    scottopell scottopell commented on Oct 17, 2026 19:14 UTC
    Author

    Successor qualification complete: exact 8095cfcb3bc4ea9942d8f1f4e9f9f0115b047f83 has all applicable checks SUCCESS in https://github.com/scottopell/phoenix-ide/actions/runs/39059626345 (Rust, Clippy, UI/specs, E2E, geometry, task validation and worker budget). Main-only monitoring jobs are correctly skipped on this PR event. P2 aggregation correction independently reviewed APPROVE; both needs lists include geometry, lightweight old/new failure/cancel/skip/success check passed; review thread resolved with https://github.com/scottopell/phoenix-ide/pull/940#discussion_r4303994443 . Exact-successor geometry artifact: https://github.com/scottopell/phoenix-ide/actions/runs/39059626345/artifacts/12111390063 . No unresolved review threads remain. Ready for Global integration assessment/merge; no merge/deploy performed by this lane.

    Reviewers
    Assignees
    scottopell scottopell
    Labels
    risk: low confidence: 86.4% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 85.5% (HIGH) · Higher = larger blast radius
    85.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 86.4% · Lower = rushed or shallow review
    86.4%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 11.7% · Safe to merge
    11.7%