Repository navigation
feat(WebApp): "בקשו מהסוכן לחלץ" — הכפתור של החילוץ בחיפוש בתיעוד נראה כמו כפתור ומזמין ללחוץ - #3756
Conversation
…ה כמו כפתור ומזמין ללחוץ - הכפתור נושא את המחלקות של "לוחות פתקים" (btn btn-secondary btn-icon), וההקטנה של .docs-extract-btn הוסרה. אייקון נצנוצים מצויר בקוד (DOCS_EXTRACT_ICON), כי ב-Font Awesome 6.4.0 החינמי אין נצנוצים בלי שרביט. - נצנוץ במצב רגיל, משמאל לימין (command-button של finesse): ::after עם גרדיאנט 105°, 250%, 2.8 שניות. הצבע: חצי --primary וחצי currentColor ב-35%, כי --primary לבדו נבלע ב-classic וב-ocean ולא נראה בניגודיות גבוהה. כבוי בזמן חילוץ וב"פחות תנועה". - בלחיצה: קפיצה (MOTION.extractPress) וכיווץ לרוחב של "מחלץ" (morph-popover, MOTION.extractMorph), ו"מחלץ" זז רק אחרי הכיווץ (is-thinking). בסוף הכפתור מתרחב בחזרה; הקפיצה מבוטלת לפני ההרחבה, כי המדידה כוללת את ה-scale שלה. - animateHeight נעשתה פונקציה אחת לשני צירים (animateSize) עם animateWidth; ההתנהגות של animateHeight הושוותה לגרסה הקודמת על אותם תרחישים, עם ובלי פחות תנועה. - בדיקות דפדפן: מראה מול "לוחות פתקים" בכל הערכות ובשתי מיובאות, כיוון וצבע הנצנוץ, סדר הכיווץ והקפיצה, חילוץ שנגמר בזמן הקפיצה, פחות תנועה, וטלפון צר. כולן נכשלות על הקוד הקודם. - תיעוד: global-search.rst, theming_and_css.rst, ויומן העדכונים. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U1fTK3iMhBFiRZERh2dDsX
|
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 |
|
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 reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Mergestorm reviews this repository's pull requestsEvery 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 The Starter plan includes 120 credits a month. |
🧯 Dangerous deletes guard reportPolicy: see .cursorrules — dangerous deletions are blocked unless wrapped safely. Summary:
Flagged findings (file:line:snippet): Excluded matches (by path pattern) |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
Code Review Summary
This PR refactors the docs extract button ("חלץ") into a fully styled, animated button ("בקשו מהסוכן לחלץ") with a shimmer invitation effect, a spring-press animation on click, a width morph transition, and a "thinking" shimmer while the agent runs. The implementation is thorough and carefully engineered.
No blocking defects were found. Key correctness aspects verified:
- Security: All server-provided content (section titles, paths, URLs) continues to pass through
escapeHtmlbefore being inserted viainnerHTML. ThedocsSiteUrlHTTPS-only validation is preserved. All fetch calls remaincredentials: 'same-origin'. - Race-condition safety: The
searchSeq/seqguards are correctly applied throughout bothperformDocsSearchandperformDocsExtract, including in thefinallyblock (if (seq === searchSeq) setDocsExtractRunning(button, false)), so a late-arriving extract response after a new search cannot write to the DOM. animateHeightbackward compatibility: The refactor fromanimateHeight→animateSize(el, 'height', ...)withanimateHeightas a passthrough wrapper preserves identical behavior for all existing callers (note-fold, group-fold, checklist-step).prefers-reduced-motion: Both the CSS (content: noneon::after,animation: noneon the shine/dot animations) and the JS (canAnimatechecks inanimateSize/play) correctly suppress all motion when the user prefers reduced motion.- DOM attachment guard:
setDocsExtractRunningis called on a potentially detached button (afterremoveDocsExtract()) only within theseq === searchSeqguard, so the morph animation is never triggered on a detached node. - CSS specificity: The new
.docs-extract-btn::aftershimmer layer correctly uses::after(not an extrabackground-imageon the button itself) to avoid being reset bydark-mode.css'sbackgroundshorthand override on.btn-secondary. - Test coverage: 6 new browser tests covering the visual appearance, shimmer direction/color, morph animation, press-cancel-on-expand, reduced-motion, and narrow-phone layout. The existing extract tests are correctly updated to use the new
EXTRACT_LABEL/RUNNING_LABELconstants.
The PR is well-documented and the deviations from the brief are clearly explained. Ready to merge pending CI green.
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.
There was a problem hiding this comment.
LlamaPReview — Review skipped
This repository has used its free review capacity for today (3 reviews per calendar day in China Standard Time, UTC+08:00). Capacity resets at 2026-11-29T16:00:00Z.
LlamaPReview is free for public repositories and funded personally, so a daily bound keeps one high-volume repository from consuming the shared budget. Nothing about this pull request was judged. You can also run LlamaPReview yourself with your own provider key — see Self-hosting.
No model-driven code review was run; this result does not assess whether the PR is ready to merge.
⏱️ Performance report(No performance test durations collected. Mark tests with |
📖 Documentation PreviewThe documentation has been built successfully!
To view locally:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| if (running) button.classList.add('is-thinking'); | ||
| return; | ||
| } | ||
| const morph = AU.animateWidth(button, swap, Object.assign({ clip: true }, AU.MOTION.extractMorph)); |
There was a problem hiding this comment.
SUGGESTION: Inline object creation on every call
Object.assign({ clip: true }, AU.MOTION.extractMorph) creates a new object each time setDocsExtractRunning runs. Since AU.MOTION.extractMorph is frozen, consider defining a constant like const EXTRACT_MORPH_CLIP = Object.freeze({ ...Object.assign({}, AU.MOTION.extractMorph), clip: true }); at module scope and reusing it.
| const from = el.getBoundingClientRect().height; | ||
| const running = heightAnims.get(el); | ||
| // ``cancel`` הגודל קופץ לערך האמיתי, והמדידה של "אחרי" לא צריכה לכלול את הישנה. | ||
| const from = el.getBoundingClientRect()[axis]; |
There was a problem hiding this comment.
SUGGESTION: Bracket notation for property access is obscure
el.getBoundingClientRect()[axis] works because DOMRect has height/width properties, but the bracket notation with a variable is hard to read. Consider const rect = el.getBoundingClientRect(); const from = axis === 'height' ? rect.height : rect.width; for clarity.
| if (running) running.cancel(); | ||
| mutate(); | ||
| const to = el.getBoundingClientRect().height; | ||
| const to = el.getBoundingClientRect()[axis]; |
There was a problem hiding this comment.
SUGGESTION: Bracket notation for property access is obscure
Same as previous comment — el.getBoundingClientRect()[axis] would be clearer with explicit property access.
| font-size:0.9rem; | ||
| font-weight:500; | ||
| gap:0.4rem; | ||
| --docs-extract-invite: color-mix(in srgb, color-mix(in srgb, var(--primary) 50%, currentColor) 35%, transparent); |
There was a problem hiding this comment.
SUGGESTION: Nested color-mix with currentColor in pseudo-element
color-mix(in srgb, color-mix(in srgb, var(--primary) 50%, currentColor) 35%, transparent) is correct (currentColor inherits from the button in ::after), but the nesting is complex. Consider adding a comment explaining the effective result: "35% opacity mix of 50% primary + 50% button text color" for future maintainers.
הקומיט שבשרת זהה ל-squash שלו ב-main, ולכן המיזוג נרשם ב-'ours' ולא משנה אף קובץ. כך הענף ממשיך מהקומיט שבשרת, בלי force push. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U1fTK3iMhBFiRZERh2dDsX
✨ תיאור קצר
הכפתור "חלץ" מעל התוצאות של החיפוש בתיעוד נראה כמו עוד שורה מהתיעוד עם מסגרת. עכשיו הוא "בקשו מהסוכן לחלץ": באותו מראה של "לוחות פתקים" בשורת הקטגוריות, עם אייקון נצנוצים ועם נצנוץ עדין שמזמין ללחוץ. בלחיצה הוא קופץ, מתכווץ לרוחב של "מחלץ", ו"הסוכן חושב" מתחיל רק כשהכיווץ נגמר.
📦 שינויים עיקריים
פירוט נקודות (רשימת תבליטים):
btn btn-secondary btn-icon), וההקטנה של.docs-extract-btn(טקסט 0.9rem, משקל 500 וריפוד קטן) הוסרה. כך הגודל והצבעים מגיעים מאותו מקור בכל ערכה. בניתי אותו לפי המקור, ולא העתקתי ערכים.DOCS_EXTRACT_ICONב-global_search.js). ב-Font Awesome 6.4.0 החינמי שהאתר טוען (בדקתי את ה-CSS מה-CDN) איןfa-sparkles, ויש רק נצנוצים עם שרביט, יד או ספריי. האפשרות הזו נבחרה עם המשתמש.command-buttonשל finesse, ב-CSS בלי React): שכבת::afterעם גרדיאנט בזווית 105°,background-size: 250%, ו-2.8 שניות linear בלולאה, משמאל לימין. הצבע הוא חצי--primaryוחציcurrentColor, בעוצמה של 35%.--primaryלבדו נבלע ב-classic וב-ocean ולא נראה בניגודיות גבוהה (נבדק בצילומים של 9 ערכות). הנצנוץ כבוי בזמן חילוץ וב"פחות תנועה". זהanimationולאtransition.MOTION.extractPress, הגדלה ל-1.06 עםcubic-bezier(.2,1.6,.3,1)) ומתכווץ לרוחב של "מחלץ" (morph-popover,MOTION.extractMorph), והתוכן מופיע בהדרגה. "מחלץ" זז (is-thinking) רק אחרי שהכיווץ נגמר. בסוף הכפתור מתרחב בחזרה. הקפיצה מבוטלת לפני ההרחבה, כי המדידה כוללת את ה-scaleשלה.AnimUtils:animateHeightנעשתה פונקציה אחת לשני צירים (animateSize), ונוסף השםanimateWidth. ההתנהגות שלanimateHeightלא השתנתה: השוויתי אותה לגרסה הקודמת על אותם תרחישים, עם ובלי "פחות תנועה".docs/webapp/global-search.rst,docs/webapp/theming_and_css.rst(רשימתAnimUtils), ויומן העדכונים.סטיות מהבריף, שכדאי לדעת עליהן:
setTimeoutשמחזיר את היעד ל-1, ואחריו עוד 150ms של ירידה (משך ברירת המחדל שלtransitionב-Tailwind, שבדקתי ב-3.4.17 וב-4.1.11).background-repeat: no-repeat: בקומפוננטה ברירת המחדל היאrepeat, ואז עותק שני של הפס נכנס בסוף כל סבב ונקטע.--primaryלבדו (ההסבר למעלה).transformוהכיווץ הוא רוחב.שני הבדלים מול "לוחות פתקים" שנשארו: הם מגיעים מסוג האלמנט ולא מהמחלקות. "לוחות פתקים" הוא
<a>, והכפתור הוא<button>. בניגודיות גבוההhigh-contrast.cssנותן לכלbuttonגבול של 2px. בערכה מיובאתdark-mode.cssצובע כלaב---primary. הכפתור זהה לכפתור "נקה" שבאותו עמוד בכל 9 הערכות.🧪 בדיקות
Unit
Integration (דפדפן)
Manual (מדידה וצילומים בכרומיום)
6 בדיקות דפדפן חדשות ב-
tests/test_docs_search_card_browser.py: המראה מול "לוחות פתקים" בכל הערכות המובנות ובשתי מיובאות; כיוון הנצנוץ, צבע שנגזר מ---primary, והנצנוץ כבוי בזמן חילוץ; כיווץ וקפיצה, ו"מחלץ" זז רק אחרי הכיווץ; חילוץ שנגמר בזמן הקפיצה; "פחות תנועה"; וטלפון ברוחב 320px. עדכנתי 2 בדיקות שבדקו את הטקסט "חלץ".הרצת בקרה על הקוד הקודם: כל 6 החדשות ושתי המעודכנות נכשלו. מוטציה: בלי ביטול הקפיצה, ההרחבה מכוונת ל-224px במקום ל-211px, והבדיקה נכשלת.
/filesהוחלפה ברשימה ריקה, בתוסף pytest מקומי מחוץ לריפו. 11/11 בדיקות החילוץ עוברות, יציבות ב-3 הרצות. ב-CI הן ירוצו מול מונגו אמיתי.לא רץ מקומית:
tests/test_state_motion_browser.py, שצריך מונגו אמיתי וכותב פתקים. אתanimateHeightהשוויתי לגרסה הקודמת בנפרד. שתי בדיקות של מדידת תמונה (test_a_short_section_is_measured_again_when_its_image_loads) נכשלות כאן בדיוק באותה שגיאה גם על הקוד הקודם (_pw_impl_instance_, תקלה של Playwright בסביבה), ולכן הן לא קשורות לשינוי.לא אומת: ספארי או אייפד אמיתי.
🧪 בדיקות נדרשות ב‑PR
📝 סוג שינוי
✅ צ'קליסט
--docs-extract-inviteהוא טוקן מקומי של הרכיב, שנגזר מ---primarydocs/whats-new/2026-11.rst, 29.11.2026)docs/webapp/theming_and_css.rst(הנחיות למפתחים, אנימציות של מעבר מצב, בדיקות חובה לפני Merge, שכבות משתנים),docs/doc-authoring.rst(רשומה ב-What's New),docs/versioning-stable-anchors.rst| המשפט: "Web Animations אוanimationשל CSS — לאtransition"🧩 השפעות/סיכונים
animateHeightמשמשת את מיזעור הפתק, את הקבוצה בפיד ואת הצעד בצ'קליסט. ההתנהגות שלה לא השתנתה, והשוויתי אותה לגרסה הקודמת.🔗 קישורים
command-buttonו-morph-popoverב-finesse; MDN, "Keyframe formats" (easingשל מסגרת חל עד המסגרת הבאה)🧯 סיכון / החזרה לאחור (Rollback)
Generated by Claude Code