Skip to content

fix(WebApp): "חפש" ו"ללוחות" בחיפוש הפתקים מעוצבים — note-boards.css נטען מ-base_boards.html לכל עמודי הלוחות - #3755

Merged
amirbiron merged 2 commits into
mainfrom
claude/relaxed-thompson-6fc20u
Nov 28, 2026

Conversation

@amirbiron

@amirbiron amirbiron commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

✨ תיאור קצר

  • בעמוד /notes/search הכפתור "חפש" הוצג בעיצוב ברירת המחדל של הדפדפן, והקישור "ללוחות" כקישור כחול עם קו. עכשיו שניהם מעוצבים כמו בשאר עמודי הלוחות, ו"חפש" בגובה ובגודל הטקסט של השדה שלידו.
  • שורש הבעיה: שניהם נושאים board-action, שמעוצב ב-note-boards.css, וכל עמוד לוחות טען את הקובץ בעצמו — ו-notes_search.html לא טען. עכשיו base_boards.html טוען אותו לכל העמודים שיורשים ממנו, כך שעמוד לוחות חמישי לא ייפול באותו מקום.
  • בדרך התגלה ותוקן באג קיים: קישור עם board-action ("🗃️ ארכיון", "כל הלוחות", ועכשיו "ללוחות") קיבל את צבע הקישור של הערכה על הרקע של הכפתור, ובניגודיות גבוהה כמעט לא נראה (1.02:1).

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

  • קוד (WebApp: תבניות ו-CSS)
  • בוט טלגרם
  • מסד נתונים/מיגרציות
  • תיעוד (docs/)
  • DevOps/CI/CD

פירוט נקודות:

  • base_boards.html ממלא את extra_css עם note-boards.css. עמוד שדורס את הבלוק קורא {{ super() }} בדיוק במקום שבו הקובץ נטען אצלו: בלוח ובארכיון סדר הטעינה לא השתנה (נמדד בכרומיום: אותו סדר גיליונות בשלושת העמודים לפני ואחרי). note_boards.html לא צריך extra_css בכלל. ההנמקה, כולל למה super() ולא בלוק חדש ב-base.html, בהערה בראש הקובץ.
  • notes-search.css — .notes-search-box .board-action: font-size: inherit (כמו font: inherit של השדה) ו-align-self: stretch, כך שהגובה נגזר מהשורה שהשדה קובע ולא ממספר שני שצריך להישאר שווה לריפוד של השדה. רק תכונות לוגיות (padding-inline).
  • note-boards.css — a.board-action.board-action (וגם :hover) לוקח את color ואת opacity של הכפתור; המחלקה כפולה כדי לגבור על [data-theme="dark"] a מ-dark-mode.css בלי !important (התקדים .ck-toast.ck-toast). ובבלוק ה-High Contrast הקיים בקובץ — רקע שחור וגבול לבן לקישור, כמו כפתור בערכה; הטקסט נשאר צהוב עם קו, כמו כל קישור שם.
  • tests/test_mcp_note_view.py — _board_load_order פותר עכשיו {{ super() }} כמו Jinja (אחרת היה מפיל בשקט את note-boards.css מהסדר שהוא מתיימר לשחזר). הסדר שהוא גוזר שווה לסדר שהדפדפן טען בפועל.
  • docs/whats-new/2026-11.rst — שתי רשומות, אחת לכל תיקון.

🧪 בדיקות

  • Unit
  • Integration (דרך האפליקציה האמיתית)
  • Manual / דפדפן

חדשות:

  • test_every_board_page_loads_note_boards_css_once (פרמטרי, 4 עמודים) — כל עמוד שיורש מ-base_boards.html מקבל את הקובץ פעם אחת בדיוק עם ?v=, דרך הראוט (url_for) ועם template_rendered שמוודא שזו התבנית הנכונה.
  • test_every_page_that_extends_base_boards_is_listed — עמוד בן חדש שלא נוסף לרשימה נכשל.
  • test_board_action_is_used_only_where_note_boards_css_is_loaded — board-action בתבנית שאינה יורשת מהבסיס, או בסקריפט ב-static/js, נכשל.
  • tests/test_board_action_browser.py (כרומיום): הקישור נראה כמו הכפתור בכל ערכה מובנית (הרשימה נגזרת מ-ALLOWED_UI_THEMES), גם בריחוף; "חפש" בגובה ובגודל הטקסט של השדה, ובטלפון ברוחבו ובלי גלילה לרוחב.

הוכחה שהבדיקות מסוגלות להיכשל (ב-worktree נפרד):

  • הקוד הישן: notes_search.html נכשל (0 == 1), ובדיקת הדפדפן נכשלת.
  • מוטציות: super() + תגית כפולה ← נכשל (2); עמוד בן חדש שלא ברשימה ← נכשל; board-action בסקריפט או בתבנית אחרת ← נכשל; רק התבניות בלי תיקון הקישור ← נכשל; בלי כלל ה-High Contrast ← נכשל; בלי הצבע של הקישור ← נכשל; בלי גודל הכפתור ← נכשל.

ריצות: 2024 בדיקות שסורקות תבניות ו-CSS עברו; 3123 בדיקות תיעוד עברו; כל tests/*.test.js עוברים כמו ב-CI; 152 בדיקות דפדפן של הלוחות/פתקים/חיפוש עברו. כשל אחד לא קשור: test_repo_notes_browser.py::test_a_new_note_opens_in_view_when_the_code_is_scrolled_sideways נכשל בריצה מקבילה (-n 4) — וגם על הקוד הישן באותה ריצה מקבילה; בריצה טורית על הקוד החדש כל 15 הבדיקות בקובץ עוברות. דפדפן הריפו אינו נוגע ב-base_boards.html או ב-note-boards.css.

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

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

📝 סוג שינוי

  • feat: פיצ'ר חדש
  • fix: תיקון באג
  • docs: שינוי תיעוד בלבד
  • refactor: שינוי קוד ללא שינוי התנהגות
  • perf: שיפור ביצועים
  • chore/ci: תשתית/CI
  • breaking change: שינוי שובר תאימות

✅ צ'קליסט

  • בדיקות רצות ועוברות
  • תיעוד עודכן (whats-new)
  • אין טוקנים חדשים; אין HEX ב-notes-search.css; ב-note-boards.css נוספו #000/#fff רק בבלוק ה-High Contrast הקיים (אותה תבנית שכבר בבלוק)
  • אין סודות/מפתחות בקוד
  • אין מחיקות מסוכנות
  • הודעת הקומיט תואמת Conventional Commits
  • עיינתי במסמכי אתר התיעוד — AI-MAP.md; docs/webapp/theming_and_css.rst ("הנחיות למפתחים", "בדיקות חובה לפני Merge", "שימושים נוספים וחריגים" — מלכודת הספציפיות ו-.ck-toast.ck-toast); docs/testing.rst ("הנחיות קריטיות", "בדיקות דפדפן"); docs/doc-authoring.rst ("רשומה ב-What's New"); docs/mcp-server.rst (הסדר של הלוח ש-_board_load_order גוזר). ב-amir-bug-patterns: B4/B5 + stale-asset-cache-policy, prose-restates-code-fact, claude-md-snippets/testing.md.

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

  • עמודי הלוח והארכיון: אותו סדר גיליונות בדיוק (נמדד). השינוי הנראה בהם הוא רק בקישורים של board-action — בערכות הכהות הטקסט בצבע של הכפתור, ובניגודיות גבוהה על רקע שחור.
  • ממצא שלא טופל כאן: ב-Classic, כל board-action (וגם הטקסט בשדה החיפוש עצמו) יוצא 3.9:1 — לבן על --bg-secondary הסגול. זה צימוד הטוקנים של הערכה, לא של הרכיב, ולכן לא נגעתי בו.
  • בטלפון "חפש" בשורה משלו בגובה 28px (בגובה הטקסט), נמוך מ-44px המומלצים למגע; פריסת הטלפון לא שונתה.

🔗 קישורים

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

  • revert של הקומיט. אין מסד, אין ENV, אין שינוי API.

Generated by Claude Code

View guided diff Turn on auto-fix

…נטען מ-base_boards.html לכל עמודי הלוחות

- base_boards.html טוען את note-boards.css בבלוק extra_css, וכל עמוד שדורס את הבלוק קורא {{ super() }} במקום שבו הקובץ נטען אצלו. בלוח ובארכיון סדר הטעינה לא השתנה (נבדק בכרומיום).
- "חפש" מקבל ב-notes-search.css את גודל הטקסט ואת הגובה של השדה שלידו.
- a.board-action לוקח את צבע הטקסט והשקיפות של הכפתור גם בערכות הכהות, ובניגודיות גבוהה רקע וגבול של כפתור בערכה (היה כמעט בלתי קריא).
- בדיקות: כל עמוד שיורש מ-base_boards מקבל את הקובץ פעם אחת עם ?v=, board-action רק בעמודים כאלה, ובדפדפן הקישור נראה כמו הכפתור בכל ערכה. _board_load_order פותר עכשיו {{ super() }}.

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

Copy link
Copy Markdown

Warning

Amazon Q Developer for GitHub: end of support

On January 30, 2027, AWS will discontinue support for the Amazon Q Developer for GitHub App. New app installations will no longer be available starting November 18, 2026.

For capabilities similar to the Amazon Q Developer for GitHub App, explore Kiro and the Kiro GitHub App. For more information about the end of support, see Amazon Q Developer end-of-support announcement on the AWS DevOps Blog.

@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

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T23:04:52.054803Z 9ec67d2 PR opened
ℹ️ About Codex in GitHub

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.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@mergestorm-vortex

mergestorm-vortex Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Mergestorm reviews this repository's pull requests

Every PR gets AI code review that flags real bugs before they merge. This account's 30 free credits for this monthly window are used, so reviews are paused at d46d330 and resume automatically on Dec 5 (UTC).

The Starter plan includes 120 credits a month.

Upgrade for more reviews →

@sourcery-ai

sourcery-ai Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Sorry @amirbiron, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 3 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@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): 14
  • 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: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/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/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]
./Dockerfile:67:    rm -rf /var/lib/apt/lists/*; \
./Dockerfile:162:    rm -rf /var/lib/apt/lists/*; \
./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]
./docs/DOCUMENTATION_GUIDE.md:453:rm -rf _build
./docs/Makefile:24:	rm -rf $(BUILDDIR)

@amazon-q-developer amazon-q-developer 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.

Code Review Summary

This PR correctly fixes the missing note-boards.css on the /notes/search page and resolves the low-contrast link styling issue for a.board-action in dark/high-contrast themes.

All changes are correct. No blocking defects were found:

  • base_boards.html: The new extra_css block centralising note-boards.css loading is the right architectural fix. The rationale for using {{ super() }} over a new block in base.html is sound and well-documented.
  • notes_search.html: The {{ super() }} call before notes-search.css is in the correct position, ensuring note-boards.css loads first (as documented — required because notes-search.css overrides .notes-search-box .board-action).
  • note_board.html / note_archive.html: Both already had {{ super() }} in their extra_css blocks; stylesheet load order is preserved.
  • note_boards.html: Correctly has no extra_css block (only needs note-boards.css from the base).
  • note-boards.css: The doubled-class specificity trick (a.board-action.board-action) to override [data-theme="dark"] a without !important is a legitimate, documented approach consistent with .ck-toast.ck-toast already in the codebase.
  • tests/test_mcp_note_view.py: The updated _board_load_order function now correctly models Jinja's {{ super() }} resolution, fixing a silent correctness bug in the existing test helper.
  • tests/test_note_boards_ui.py: The three new tests (test_every_page_that_extends_base_boards_is_listed, test_board_action_is_used_only_where_note_boards_css_is_loaded, test_every_board_page_loads_note_boards_css_once) provide strong regression coverage for the original bug pattern.

The PR is ready to merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@gitar-bot

gitar-bot Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Gitar is working

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

Gitar

@github-actions

github-actions Bot commented Nov 28, 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 Nov 28, 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

@codecov

codecov Bot commented Nov 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

LlamaPReview — Verification needed

Exact-head browser evidence does not establish the phone-width rendered layout or link readability across built-in themes, including hover. These are the acceptance outcomes named by the merge posture; confirming them resolves the verification needed decision.

Exact-head CI remains unresolved (1 failed, 6 pending); no CI-dependent merge-safety claim is made.

Owner action: Run or confirm the exact-head Chromium checks for the phone layout and theme readability, including contrast in Classic.

Review details and evidence

Material unknowns

  • Exact-head browser evidence does not establish the phone-width rendered layout or link readability across built-in themes, including hover. These are the acceptance outcomes named by the merge posture; confirming them resolves the verification needed decision.

LlamaPReview checks

  • Reviewed changed regions in tests/test_board_action_browser.py.
  • Reviewed changed regions in webapp/templates/notes_search.html.
  • Reviewed changed regions in webapp/static/css/note-boards.css.
  • Reviewed changed regions in webapp/templates/base_boards.html.
  • Reviewed changed regions in webapp/templates/note_board.html.
  • Reviewed changed regions in webapp/templates/note_archive.html.

LlamaPReview is open source. Explore the code behind this review.

@amirbiron
amirbiron merged commit dbaf8e9 into main Nov 28, 2026
23 of 29 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