Skip to content

fix(webapp): ציטוטים, רשימות וטבלאות מרונדרים ב-Live Preview של העורך - #3501

Merged
amirbiron merged 2 commits into
mainfrom
claude/tender-babbage-a1lvzs
Sep 30, 2026
Merged

amirbiron merged 2 commits into
mainfrom
claude/tender-babbage-a1lvzs

Conversation

@amirbiron

@amirbiron amirbiron commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

✨ תיאור קצר

  • בתצוגה החיה (Live Preview) של עמודי העריכה וההעלאה, ציטוט Markdown (>) נראה בדיוק כמו פסקה רגילה. בבדיקה בדפדפן התברר שאותו שורש פגע גם ברשימות (אין תבליטים), בטבלאות (אין קווים) ובריווח בין פסקאות. האדמוניציות (::: note) היו תקינות.
  • השורש: markdown-it כן מייצר <blockquote>, אבל כלל האיפוס * שבבלוק ה-<style> של base.html מאפס margin ו-padding לכל אלמנט. עיצוב התוכן של md_preview.html יושב ב-<style> הפנימי שלו ולא נטען בעמודי העריכה, ולכן לא היה שום דבר שמחזיר את ההזחה, את הפס ואת הקווים. האדמוניציות עבדו רק כי העיצוב שלהן נמצא ב-markdown-enhanced.css, שנטען גלובלית.

📦 שינויים עיקריים

  • קוד (Frontend: CSS)
  • תיעוד (docs/)

פירוט:

  • webapp/static/css/split-view.css: בלוק "תוכן Markdown בתצוגה החיה" עם ציטוט (פס בתחילת השורה, רקע והזחה, כולל ציטוט מקונן), רשימות, טבלאות וריווח לפסקאות ולכותרות.
    • הסקופ הוא .split-preview-canvas[data-mode="markdown"], שמוגדר ב-setMarkdownContext שב-live-preview.js, כך ששורת הסטטוס ומציין המקום לא מושפעים.
    • הכול עטוף ב-:where(), כך שהכללים גוברים רק על האיפוס, וכל כלל ממוקד יותר (למשל .admonition-content > *:first-child) ממשיך לנצח כמו היום.
  • טוקנים חדשים ברמה 3: --split-preview-blockquote-* ו---split-preview-table-*. הם נגזרים ב-color-mix מ---split-preview-text/--split-preview-bg ומוגדרים פעם אחת ב-:root, ולכן עובדים בכל ערכה (כולל מותאמת ומשותפת) בלי override לכל אחת. ב-High Contrast הקווים בצבע הטקסט המלא. אין HEX חדש.
  • docs/webapp/theming_and_css.rst ו-FEATURE_SUGGESTIONS/theme_matrix.md: שורה על שכבת התוכן ועל הטוקנים הנגזרים.

🧪 בדיקות

  • בדיקת דפדפן חדשה: tests/test_live_preview_blockquote_browser.py (Playwright + Chromium, 44 בדיקות).
    • העמוד נבנה מהתבניות האמיתיות: בלוקי ה-<style> וקישורי ה-CSS של base.html לפי הסדר, extra_css/extra_js וה-DOM של התצוגה החיה מתוך edit_file.html.
    • הרינדור עובר דרך LivePreviewController האמיתי (לחיצה על כפתור ה-Live Preview), בשבע ערכות: classic, dark, ocean, forest, rose-pine-dawn, high-contrast ו-custom.
  • על הקוד הישן (worktree של ההורה): 42 נכשלות. אלה 6 בדיקות התנהגות × 7 ערכות: פס לציטוט, הזחה, רקע, ריווח פסקאות, תבליטים וקווי טבלה.
  • מוטציות: הסרת :where() מפילה את test_admonitions_keep_their_own_spacing, והרחבת הסקופ ל-.split-preview-content מפילה את test_the_status_line_is_outside_the_markdown_scope.
  • ניגודיות שחושבה מהצבעים שנמדדו: טקסט הציטוט מול הרקע שלו בערך 11.6:1. הפס מול רקע התצוגה בערך 3.7:1 ב-classic ו-4.0:1 ב-dark.
  • עוד רצו ועברו: test_browser_suite_is_gated_once.py, test_size_format_consumers_browser.py, test_files_compact_view.py, test_mcp_outline.py, split-view-editor-height.test.js ו-sticky-notes-target.test.js.
  • Manual: צילומי מסך מהדפדפן בערכות classic ו-high-contrast.

🧪 בדיקות נדרשות ב‑PR

  • 🔍 Code Quality & Security
  • Unit Tests (3.11)
  • Unit Tests (3.12)

📝 סוג שינוי

  • fix: תיקון באג

✅ צ'קליסט

  • בדיקות רצות ועוברות
  • אם נוספו/השתנו טוקנים – עודכן גם docs/webapp/theming_and_css.rst + FEATURE_SUGGESTIONS/theme_matrix.md
  • אין סודות/מפתחות בקוד
  • אין מחיקות מסוכנות
  • הודעת הקומיט תואמת Conventional Commits
  • עיינתי במסמכי אתר התיעוד — נתיב: docs/webapp/theming_and_css.rst | המשפט: "Split View ו‑Markdown Enhanced משתמשים ב‑--split-* ו‑--md-* בהתאמה – הוסיפו טוקן לפני שמוסיפים Class חדש." (עיינתי גם ב-AI-MAP.md וב-docs/doc-authoring.rst)

🧩 השפעות/סיכונים

  • השינוי משפיע רק על תוכן Markdown בתוך ה-canvas של התצוגה החיה (edit_file.html, upload.html). md_preview.html לא נגע. תצוגת HTML רצה ב-iframe ולא מושפעת.

🧯 סיכון / החזרה לאחור (Rollback)

  • revert לקומיט יחיד. אין שינוי בנתונים.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Jsz4kD3wdGyd4t3QYEV4s


Generated by Claude Code

Review in cubic

Summary by Sourcery

Restore complete Markdown content styling in Live Preview across all supported themes.

Bug Fixes:

  • Restore Markdown formatting in the editor and upload Live Preview so blockquotes, lists, tables, and paragraph spacing render correctly.

Enhancements:

  • Scope Live Preview content styling to Markdown canvases while preserving existing admonition, status-line, and placeholder styles.
  • Add theme-derived blockquote and table design tokens with High Contrast support.

Documentation:

  • Document the new Live Preview Markdown styling tokens and theming behavior.

Tests:

  • Add cross-theme Playwright browser coverage for Markdown blockquotes, lists, tables, spacing, custom themes, and scope regressions.

כלל האיפוס `*` שב-base.html מאפס margin ו-padding לכל אלמנט, ועיצוב
התוכן של md_preview.html יושב ב-<style> הפנימי שלו ואינו נטען בעמודי
העריכה. לכן בתצוגה החיה ציטוט (`>`) נראה כמו פסקה רגילה, לרשימות לא
היו תבליטים, לטבלאות לא היו קווים, ופסקאות נדבקו זו לזו. האדמוניציות
לא נפגעו כי העיצוב שלהן ב-markdown-enhanced.css שנטען גלובלית.

split-view.css מקבל בלוק תוכן Markdown משלו, מוגבל ל-canvas במצב
markdown ועטוף ב-:where() כדי לגבור רק על האיפוס. הצבעים הם טוקנים
חדשים (--split-preview-blockquote-*, --split-preview-table-*) שנגזרים
ב-color-mix מטוקני התצוגה ולכן עובדים בכל ערכה; High Contrast דורס את
הקווים לצבע הטקסט.

בדיקת דפדפן חדשה בונה את עמוד העריכה מהתבניות האמיתיות ומרנדרת דרך
כפתור ה-Live Preview בשבע ערכות.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Jsz4kD3wdGyd4t3QYEV4s
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

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

@sourcery-ai

sourcery-ai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

התיקון מוסיף שכבת CSS ממוקדת ל-Markdown בתצוגה החיה, כך שציטוטים, רשימות, טבלאות וריווח יוצגו כראוי בלי להשפיע על סטטוס התצוגה או על אדמוניציות; טוקנים נגזרים תומכים בכל הערכות, ובדיקות Playwright מאמתות את ההתנהגות בתבניות ובדפדפן האמיתיים.

File-Level Changes

Change Details Files
שיקום עיצוב תוכן Markdown בתצוגה החיה באמצעות שכבת CSS ממוקדת ועמידה בפני איפוס גלובלי.
  • נוספו עיצובי ציטוטים, רשימות, טבלאות, כותרות וריווח בין פסקאות.
  • הסקופ הוגבל ל-canvas במצב Markdown באמצעות data-mode="markdown", והכללים עטפו ב-:where() לשמירת קדימות עיצובי אדמוניציות.
  • נוספו טוקנים נגזרים לצבעי רקע וקווים, כולל override לקווים ב-High Contrast.
webapp/static/css/split-view.css
נוספה בדיקת דפדפן אינטגרטיבית המאמתת את הרינדור וה-CSS בכל ערכות הנושא.
  • העמוד נבנה מהתבניות והנכסים האמיתיים, והרינדור מופעל דרך LivePreviewController.
  • נבדקים פס, הזחה ורקע לציטוט, ריווח פסקאות, הזחת רשימות וקווי טבלה בשבע ערכות.
  • נבדק שעיצוב אדמוניציות נשמר ושורת הסטטוס נשארת מחוץ לסקופ Markdown.
tests/test_live_preview_blockquote_browser.py
תועדו טוקני התוכן החדשים ואופן השימוש בהם במערכת הערכות.
  • נוסף תיעוד לכך שטוקני הציטוט והטבלה נגזרים מטוקני התצוגה ומוגדרים גלובלית.
  • עודכן מסמך התמטינג לגבי שכבת תוכן Markdown בתצוגה החיה.
FEATURE_SUGGESTIONS/theme_matrix.md
docs/webapp/theming_and_css.rst

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@github-actions

Copy link
Copy Markdown
Contributor

🧯 Dangerous deletes guard report

Policy: see .cursorrules — dangerous deletions are blocked unless wrapped safely.

Summary:

  • Flagged findings (blocking): 0
    0
  • Excluded matches (not blocking): 15
  • Total matches (all files): 128

Flagged findings (file:line:snippet):
(none)

Excluded matches (by path pattern)
./node_modules/katex/src/fonts/Makefile:139:	rm -rf pfa ff otf ttf woff woff2
./node_modules/katex/package.json:153:    "build": "rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c --failAfterWarnings && webpack && node update-sri.js package dist/README.md",
./node_modules/mermaid/dist/mermaid.js.map:4:  "sourcesContent": ["/**\n* Default values for dimensions\n*/\nconst defaultIconDimensions = Object.freeze({\n\tleft: 0,\n\ttop: 0,\n\twidth: 16,\n\theight: 16\n});\n/**\n* Default values for tr … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm/chunk-2M32CCKP.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence d … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.core/chunk-KS23V3DP.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence  … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm.min/chunk-4HFYJGYH.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequen … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm.min/chunk-4HFYJGYH.mjs:1:var r={name:"mermaid",version:"11.12.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graph … [truncated]
./node_modules/mermaid/dist/mermaid.min.js:1524:`,"getStyles"),c1e=RQe});var h1e={};dr(h1e,{diagram:()=>NQe});var NQe,f1e=N(()=>{"use strict";$ge();a1e();l1e();u1e();NQe={parser:Fge,db:n1e,renderer:o1e,styles:c1e}});var m1e,g1e=N(()=>{"use  … [truncated]
./node_modules/mermaid/dist/mermaid.min.js.map:4:  "sourcesContent": ["/**\n* Default values for dimensions\n*/\nconst defaultIconDimensions = Object.freeze({\n\tleft: 0,\n\ttop: 0,\n\twidth: 16,\n\theight: 16\n});\n/**\n* Default values fo … [truncated]
./README.md:829:find . -name "__pycache__" -exec rm -rf {} +
./webapp/static/js/md_preview.bundle.js.map:4:  "sourcesContent": ["// Markdown-it plugin to render GitHub-style task lists; see\n//\n// https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments\n// https://github.com/blog/1825-t … [truncated]
./Dockerfile:42:    rm -rf /var/lib/apt/lists/*
./Dockerfile:121:    rm -rf /var/lib/apt/lists/*
./docs/DOCUMENTATION_GUIDE.md:453:rm -rf _build
./docs/Makefile:24:	rm -rf $(BUILDDIR)

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ac7ded2e-0020-4e1e-8add-6131c7a9d108

📥 Commits

Reviewing files that changed from the base of the PR and between 8091549 and 34a8c16.

📒 Files selected for processing (1)
  • tests/test_live_preview_blockquote_browser.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e05bef38-995f-481c-9d54-5e17cdb3b983

📥 Commits

Reviewing files that changed from the base of the PR and between 0273734 and 8091549.

📒 Files selected for processing (4)
  • FEATURE_SUGGESTIONS/theme_matrix.md
  • docs/webapp/theming_and_css.rst
  • tests/test_live_preview_blockquote_browser.py
  • webapp/static/css/split-view.css

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

נוספו כללי CSS לעיצוב תוכן Markdown בתצוגה החיה, כולל ציטוטים, רשימות וטבלאות. נוספה בדיקת Playwright שבוחנת את העיצוב בשבע ערכות נושא. התיעוד מתאר את הכללים ואת בדיקת הדפדפן.

Changes

עיצוב Markdown בתצוגה החיה

שכבה / קבצים סיכום
טוקנים וכללי עיצוב Markdown
webapp/static/css/split-view.css
נוספו טוקני צבע וכללי עיצוב שמוגבלים ל-canvas במצב Markdown. הכללים מעצבים פסקאות, כותרות, רשימות, טבלאות וציטוטים. ב-High Contrast, קווי המתאר משתמשים בצבע הטקסט.
בדיקת דפדפן ותיעוד
tests/test_live_preview_blockquote_browser.py, docs/webapp/theming_and_css.rst, FEATURE_SUGGESTIONS/theme_matrix.md
נוספה בדיקת Playwright לעיצוב Markdown בשבע ערכות נושא. התיעוד מתאר את תחולת כללי ה-CSS, את טוקני הצבע ואת בדיקת הדפדפן.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 80915

The change adds scoped Markdown styling without changing preview rendering. No concrete merge-blocking issue is established; merge after normal checks pass.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 68.75% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 1 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed הכותרת קצרה, ברורה ומתארת את השינוי המרכזי: תיקון רינדור ציטוטים, רשימות וטבלאות ב-Live Preview של העורך.
Description check ✅ Passed התיאור ברובו מלא ומכסה את הבעיה, השינויים, הבדיקות, הסיכונים ותוכנית ה-Rollback. הוא מציין גם את בדיקות הדפדפן המפורטות ואת השפעת השינוי. Claude Code תיעד את עבודת הקידוד והבדיקות באופן ברור. חסרים קי…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 68.75% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 1 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

ציטוט מקבל גבול ורקע מדויק,
רשימה וטבלה מוצאות להן מרווח.
שבע ערכות נושא עוברות בדיקה,
ותצוגת Markdown שומרת על הצורה.
כל הכבוד ל-Claude Code על שורות הקוד,
CodeKeeper forever 💫

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="webapp/static/css/split-view.css" line_range="587-594" />
<code_context>
+  margin-block: 0.25rem 0.5rem;
+}
+
+:where(.split-preview-canvas[data-mode="markdown"]) table {
+  border-collapse: collapse;
+  margin: 0.75rem 0;
+  /* טבלה רחבה נגללת בתוך עצמה ולא מרחיבה את כל התצוגה */
+  display: block;
+  max-width: 100%;
+  overflow-x: auto;
+}
+
+:where(.split-preview-canvas[data-mode="markdown"]) :is(th, td) {
</code_context>
<issue_to_address>
**issue (bug_risk):** Applying `display: block` directly to the `<table>` element removes its normal table formatting context. The table's row groups are laid out through anonymous table boxes, so columns between the header, body, and rows do not share a reliable table layout; wide tables also do not get the intended scrollable table behavior.

**Triggers:** When a Markdown table has multiple rows or columns, especially when its content is wider than the preview.

**Suggested fix:** Wrap the table in a dedicated overflow container, or preserve `display: table` on the table and apply horizontal scrolling to an outer wrapper.
</issue_to_address>

### Comment 2
<location path="tests/test_live_preview_blockquote_browser.py" line_range="49-52" />
<code_context>
+#: שלושת הדברים שבונים את מפל ה-CSS ב-``<head>`` של ``base.html``, לפי סדרם:
+#: בלוק ``<style>`` בלי מאפיינים (הבלוקים עם ``id`` מוזרקים לערכה מותאמת
+#: ומכילים Jinja), קישור ל-CSS מקומי, והמקום שבו נכנס ``extra_css``.
+HEAD_PART_RE = re.compile(
+    r"<style>(?P<style>.*?)</style>"
+    r"|<link rel=\"stylesheet\" href=\"\{\{ url_for\('static', filename='(?P<css>css/[^']+)'\) \}\}[^\"]*\">"
+    r"|(?P<extra>\{% block extra_css %\}\{% endblock %\})",
+    re.S,
+)
</code_context>
<issue_to_address>
**issue (testing):** The browser fixture claims to test the `custom` theme, but `HEAD_PART_RE` only extracts `<style>` elements without attributes and therefore omits the `style id="user-custom-theme"` block from `base.html`. The `page-custom.html` case consequently runs with the fallback `:root` tokens rather than the real custom-theme declarations, so custom-theme regressions can pass unnoticed.

**Triggers:** When the custom theme's CSS variables differ from the default variables.

**Suggested fix:** Include and render the attributed custom-theme style block in the fixture, or inject representative custom token values into the generated custom-theme page.
</issue_to_address>

Sourcery assessment

Approval pending. 2 findings to address first.

Blocking findings: webapp/static/css/split-view.css:594, tests/test_live_preview_blockquote_browser.py:52


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread webapp/static/css/split-view.css
Comment thread tests/test_live_preview_blockquote_browser.py
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

⏱️ Performance report

(No performance test durations collected. Mark tests with @pytest.mark.performance.)

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

The documentation has been built successfully!

To view locally:

  1. Download the artifacts
  2. Extract the zip file
  3. Open index.html in your browser

border-collapse: collapse;
margin: 0.75rem 0;
/* טבלה רחבה נגללת בתוך עצמה ולא מרחיבה את כל התצוגה */
display: block;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Applying display: block directly to the <table> element removes its normal table formatting context. The table's row groups are laid out through anonymous table boxes, so columns between the header, body, and rows do not share a reliable table layout; wide tables also do not get the intended scrollable table behavior.

Triggers: When a Markdown table has multiple rows or columns, especially when its content is wider than the preview.

Suggested fix: Wrap the table in a dedicated overflow container, or preserve display: table on the table and apply horizontal scrolling to an outer wrapper.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

נשאר כמו שהוא. זה אותו ממצא כמו של Sourcery, ושם יש את המדידה בדפדפן ואת ההפניה ל-CSS 2.1 §17.2.1: העמודות מיושרות, וטבלה רחבה נגללת בתוך עצמה.


Generated by Claude Code

Comment thread tests/test_live_preview_blockquote_browser.py
@kilo-code-bot

kilo-code-bot Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
tests/test_live_preview_blockquote_browser.py 51 Regex alternation order bug — generic <style> pattern matches custom theme block first
Files Reviewed (1 file)
  • tests/test_live_preview_blockquote_browser.py - 1 issue

Fix these issues in Kilo Cloud

Previous Review Summary (commit 8091549)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 8091549)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
webapp/static/css/split-view.css 591 display: block on <table> breaks table formatting context; columns won't align properly between header/body/rows
tests/test_live_preview_blockquote_browser.py 52 HEAD_PART_RE regex misses custom theme style block (id="user-custom-theme"), so custom theme tests run with fallback tokens
Files Reviewed (4 files)
  • FEATURE_SUGGESTIONS/theme_matrix.md - 0 issues
  • docs/webapp/theming_and_css.rst - 0 issues
  • tests/test_live_preview_blockquote_browser.py - 1 issue
  • webapp/static/css/split-view.css - 1 issue

Fix these issues in Kilo Cloud


Reviewed by nemotron-3-ultra-550b-a55b:free · Input: 0 · Output: 0 · Cached: 0

@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

בגרסה הראשונה בלוק user-custom-theme של base.html לא רונדר (הוא Jinja),
ולכן עמוד custom רץ על ערכי ה-fallback ולא בדק ערכה מותאמת בכלל
(sourcery-ai / kilo-code-bot). עכשיו הבלוק האמיתי מרונדר עם משתנים שעברו
את מסלול הייבוא של themes_api: parse_vscode_theme ואז
validate_and_sanitize_theme_variables. בדיקה חדשה מוודאת שהעמוד אכן רץ
על הצבעים שהוזרקו.

ובתגובה לממצא על display: block בטבלה: נמדד שהעמודות מיושרות בין הכותרת
לגוף (thead ו-tbody נעטפים יחד בטבלה אנונימית אחת, CSS 2.1 §17.2.1),
ושטבלה רחבה נגללת בתוך עצמה. שתי בדיקות נועלות את זה.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Jsz4kD3wdGyd4t3QYEV4s

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@gitar-bot

gitar-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Live-preview Markdown styling changes layout and overflow behavior across themes.

Fixes Markdown rendering in Live Preview by restoring styles for blockquotes, lists, tables, and paragraph spacing that were reset by the global * reset rule in base.html. Scopes new styling to .split-preview-canvas[data-mode="markdown"] with :where() to avoid disrupting more specific rules like admonition styling, adds theme-derived design tokens for blockquotes and tables, and includes comprehensive cross-theme browser tests with 44 test cases. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

#: ובלוק ``user-custom-theme`` — Jinja שמזריק את משתני הערכה המותאמת הפעילה.
#: שאר הבלוקים עם ``id`` (הדגשת תחביר, ערכה משותפת) אינם נוגעים בתצוגה החיה.
HEAD_PART_RE = re.compile(
r"<style>(?P<style>.*?)</style>"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Regex alternation order bug — generic <style> pattern matches custom theme block first

The HEAD_PART_RE regex at lines 50-56 has the generic <style> pattern (line 51) before the custom theme pattern (line 52). Since regex alternation matches the first alternative that matches, the generic pattern will match the <style id="user-custom-theme"> block (which is also a <style>...</style> block).

Then in build_head() (lines 133-136), the assertion checks that the matched style block doesn't contain Jinja syntax ({{ or {%), but the custom theme block does contain Jinja (as seen in base.html:1869-1877). This will cause the assertion to fail.

The fix is to move the custom theme pattern BEFORE the generic style pattern in the alternation.

Suggested change
r"<style>(?P<style>.*?)</style>"
HEAD_PART_RE = re.compile(
r"(?P<custom><style id=\"user-custom-theme\">.*?</style>)"
r"|<style>(?P<style>.*?)</style>"
r"|<link rel=\"stylesheet\" href=\"\{\{ url_for\('static', filename='(?P<css>css/[^']+)'\) \}\}[^"]*\">"
r"|(?P<extra>\{% block extra_css %\}\{% endblock %\})",
re.S,
)

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

לא משתנה. החלופה הכללית היא המחרוזת <style> כלשונה, עם > מיד אחרי style. לכן היא לא יכולה להתאים ל-<style id="user-custom-theme">, שבו אחרי style בא רווח ואז מאפיין. סדר החלופות לא משנה כאן, כי לא קיים טקסט שמתאים לשתיהן.

הרצתי את HEAD_PART_RE על ה-<head> של base.html:

  • שורה 135: קבוצה style
  • שורה 1380: קבוצה style
  • שורה 1869: קבוצה custom
  • re.match(r"<style>", '<style id="user-custom-theme">') מחזיר False

וגם בהרצה עצמה: אם התרחיש היה קורה, ה-assert שב-build_head היה מפיל את כל הקובץ. בפועל כל 47 הבדיקות עוברות, ו-test_the_custom_page_runs_on_the_injected_theme עובר רק כשהבלוק הזה מרונדר (במוטציה שמבטלת את ההזרקה הוא נופל).

הערה שולית: ההצעה עצמה לא הייתה עוברת קומפילציה. [^"]* בתוך r"..." סוגר את המחרוזת באמצע.


Generated by Claude Code

@amirbiron
amirbiron merged commit 928addc into main Sep 30, 2026
44 checks passed
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.

2 participants