fix(webapp): מקור אמת אחד לגודל קובץ, והערך נקרא בסדר לטיני גם בעברית - #3345
Conversation
כרטיס קובץ הציג 105.0 KB ו-582.0 B: תו נוסף בלי מידע נוסף. הסיבה היא
:.1f בפורמטרים, שמדפיס ספרה אחרי הנקודה גם כשהיא אפס. שבר אמיתי נשאר —
27.9 KB ממשיך להיות 27.9 KB — כי שם הספרה כן אומרת משהו.
הכלל היה משוכפל בין webapp/app.py ל-webapp/collections_api.py, ושני
העותקים יכלו להיסחף זה מזה. במקום להוסיף עותק שלישי של החיתוך נוצר
webapp/size_format.py — מודול עלה בלי תלויות, ולכן אפשר לייבא אותו מכל
מקום בלי מעגל ייבוא — ושתי הפונקציות מאצילות אליו. השם format_file_size
נשאר ב-app.py כי הוא נקרא משם בעשרות מקומות ומהתבניות.
בצד הלקוח אותו כלל בשלושה מקומות שהציגו .0: compare.js, global_search.js
ו-live-preview.js. הם עברו ל-parseFloat סביב toFixed(1) — האידיום שכבר
היה בשימוש ב-json-formatter.js וב-repo-browser.js, כך שכל חמשת הפורמטרים
בצד הלקוח מתנהגים עכשיו אותו דבר.
TextUtils.format_file_size ב-utils.py **לא** שונה בכוונה: הוא מזין את
הודעות הבוט ולא את הוובאפ, ושני טסטים מתעדים שם את ההתנהגות הקיימת
("1.0 KB"). שינוי שלו הוא החלטה נפרדת.
אימות:
- הפורמטר עצמו: 0 B, 3 B, 582 B, 4 KB, 105 KB, 1 MB, 5 GB, 2 TB, ולצידם
27.9 KB ו-1.5 MB ששומרים את השבר.
- **ברמת הצרכן**: הטסט הקיים שמרנדר את /files דרך Flask ובודק את המחרוזת
בכרטיס עודכן מ-"3.0 B" ל-"3 B" ורץ ירוק.
- שלושת הפורמטרים בצד הלקוח הורצו ב-node מתוך הקבצים האמיתיים שנשלחים
לדפדפן (חילוץ בביטוי רגולרי מהמקור, לא העתק שנכתב ביד): 582 B, 4 KB,
27.9 KB, 105 KB.
- מוטציה: החזרת השורה הישנה הפילה 12 בדיקות, ובהן בדיקת ה-HTML של /files.
שחזור החזיר את כולן לירוק.
- לא פתחתי דפדפן: פיקסצ'ר admin_live_server מרים את הוובאפ בלי מסד נתונים,
ולכן /files אינו מרנדר שם כרטיסי קבצים בכלל. מסלול ה-DOM לא השתנה —
אותה משבצת בתבנית ואותו textContent — ומה שכן השתנה, המחרוזת עצמה, מוכח
ברמת ה-HTML וב-node.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y251xcBYzeYZUimEMKBQsSⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
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 2 hours and 13 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
🧯 Dangerous deletes guard reportPolicy: see .cursorrules — dangerous deletions are blocked unless wrapped safely. Summary:
Flagged findings (file:line:snippet): Excluded matches (by path pattern) |
Reviewer's GuideThe PR removes redundant Flow diagram for normalized file-size formattingflowchart TD
Input[File size in bytes] --> Convert[Convert to display units]
Convert --> Round[Round to one decimal place]
Round --> Check{Ends with .0?}
Check -->|Yes| Trim[Remove .0]
Check -->|No| Keep[Keep decimal digit]
Trim --> Output[Display value with unit]
Keep --> Output
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
השינוי עבר ל-PR ממוקד משלו (#3345) מעל main, כדי שיהיה בר-סקירה בפני עצמו ולא ייבלע בתוך סבב התיעוד של #3297. זה ביטול על הענף בלבד ולא ויתור על השינוי: הקוד חי ב-#3345 עם אותם אימותים. שני סדרי המיזוג בטוחים — אם #3345 ייכנס ראשון, ההוספה והביטול כאן מבטלים זה את זה ולא יגעו בקבצים; ואם הענף הזה ייכנס ראשון, השינוי פשוט יגיע מאוחר יותר מ-#3345. This reverts commit d07d83f. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y251xcBYzeYZUimEMKBQsS
Warning Review limit reachedNext included review available in 27 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (12)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughהשינוי מרכז את עיצוב גדלי הקבצים במימושי Python ו-JavaScript משותפים. הפורמט מטפל ביחידות B עד TB, בעיגול חצאים, בערכים לא-סופיים ובסדר bidi. נוספו בדיקות Node, Python ו-Chromium. Changesעיצוב פורמט משותף
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk:🟡 Moderate · up to The comparison page can fail when a file is selected because the shared formatter may not be loaded yet. Resolve the script ordering before merge. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 56.76% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 13 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
⏱️ Performance report(No performance test durations collected. Mark tests with |
📖 Documentation PreviewThe documentation has been built successfully!
To view locally:
|
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
שישה מימושים של עיצוב גודל בצד הלקוח (compare, global_search, live-preview,
json-formatter, repo-browser, file-form-manager) אוחדו ל-utils/size-format.js
שנטען מ-base.html, ותאום שלו בפייתון כבר קיים ב-webapp/size_format.py.
האיחוד תיקן שלושה באגים שנבעו ישירות מהפיצול:
- live-preview חילק ב-1024 פעם אחת בלבד: 3.5 מגה הוצגו "3584KB", 582 בתים "0.6KB"
- global_search עצר ב-MB: 2 ג'יגה הוצגו "2048 MB"
- repo-browser עצר ב-GB: מעל טרה-בייט הוא החזיר "3 undefined"
בנוסף, שני תיקונים שנמצאו במדידה ולא בקריאת קוד:
1. "105 KB" בתוך טקסט בעברית התהפך על המסך ל-"KB 105". אלגוריתם ה-bidi אינו
מדביק מספר למילה לטינית דרך רווח ניטרלי — הרווח נופל לכיוון הפסקה והמחרוזת
נשברת לשני קטעים שמסודרים מימין לשמאל. נמדד ב-Chromium: KB ב-x=325 מול 105
ב-x=350. הערך עטוף עכשיו ב-LRI/PDI בתוך המחרוזת עצמה ולא ב-dir על האלמנט,
כי לא לכל גודל יש אלמנט משלו: app.py בונה "הקובץ גדול מדי לתצוגה (105 KB)"
ו-file-form-manager בונה "x גדול מדי (מקסימום 2 MB)" כמחרוזת אחת.
2. השרת והדפדפן לא הסכימו על 1280 בתים. f"{1.25:.1f}" מעגל חצי לזוגי ומחזיר
"1.2", ו-(1.25).toFixed(1) מעגל חצי כלפי מעלה ומחזיר "1.3". העיגול נכתב
עכשיו במפורש בשתי השפות באותן פעולות על אותם doubles, במקום להישען על
ברירת המחדל של אף אחת מהן.
בדיקות:
- tests/size-format.test.js — סולם היחידות, העיגול והבידוד (רץ בג'וב JS Tests)
- tests/test_file_size_display.py — צד השרת, ובדיקה שמריצה את שני המימושים
על אותו וקטור ומשווה. זו הבדיקה שתפסה את פער העיגול.
- tests/test_size_format_bidi_browser.py — סדר הציור בדפדפן אמיתי, כולל ריצת
בקרה שדורשת שהמחרוזת ללא בידוד כן תתהפך, אחרת הבדיקה מאבדת משמעות בשקט.
שתי הבדיקות החדשות הורצו על הקוד שלפני התיקון ונפלו.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y251xcBYzeYZUimEMKBQsSThere was a problem hiding this comment.
2 issues found across 12 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="webapp/static/js/live-preview.js">
<violation number="1" location="webapp/static/js/live-preview.js:810">
P2: Custom agent: **Enforce Pragmatic Test Coverage**
The new live-preview delegation is not exercised by the added tests. Both JS test harnesses call `SizeFormat.formatFileSize` directly without loading `live-preview.js`, so they do not validate `updateMeta`'s numeric guard or `window.SizeFormat` integration. Add an integration test that invokes `updateMeta` with representative byte values and missing/non-number metadata.</violation>
</file>
<file name="webapp/static/js/utils/size-format.js">
<violation number="1" location="webapp/static/js/utils/size-format.js:95">
P1: כאשר דף `compare_files` נטען עם קבצים שנבחרו מראש, האתחול הסינכרוני קורא ל-`window.SizeFormat` לפני שהסקריפט הדחוי מגדיר אותו, ולכן האתחול נכשל עם `TypeError` וכרטיסי התצוגה אינם נטענים. חומרה: 7/10. טען את `size-format.js` ללא `defer`, או דחה את אתחול `compare_files` עד לאחר טעינת ה-API.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| } | ||
| if (typeof window !== 'undefined') { | ||
| window.SizeFormat = { |
There was a problem hiding this comment.
P1: כאשר דף compare_files נטען עם קבצים שנבחרו מראש, האתחול הסינכרוני קורא ל-window.SizeFormat לפני שהסקריפט הדחוי מגדיר אותו, ולכן האתחול נכשל עם TypeError וכרטיסי התצוגה אינם נטענים. חומרה: 7/10. טען את size-format.js ללא defer, או דחה את אתחול compare_files עד לאחר טעינת ה-API.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At webapp/static/js/utils/size-format.js, line 95:
<comment>כאשר דף `compare_files` נטען עם קבצים שנבחרו מראש, האתחול הסינכרוני קורא ל-`window.SizeFormat` לפני שהסקריפט הדחוי מגדיר אותו, ולכן האתחול נכשל עם `TypeError` וכרטיסי התצוגה אינם נטענים. חומרה: 7/10. טען את `size-format.js` ללא `defer`, או דחה את אתחול `compare_files` עד לאחר טעינת ה-API.</comment>
<file context>
@@ -0,0 +1,103 @@
+ }
+
+ if (typeof window !== 'undefined') {
+ window.SizeFormat = {
+ UNITS: UNITS,
+ LRI: LRI,
</file context>
Uh oh!
There was an error while loading. Please reload this page.
| const size = typeof meta.bytes === 'number' ? `${(meta.bytes / 1024).toFixed(1)}KB` : ''; | ||
| // המימוש הקודם חילק ב-1024 פעם אחת והציג תמיד KB, ולכן קובץ של 582 | ||
| // בתים הופיע כ-"0.6KB" ושל 3.5 מגה כ-"3584KB". | ||
| const size = typeof meta.bytes === 'number' ? window.SizeFormat.formatFileSize(meta.bytes) : ''; |
There was a problem hiding this comment.
P2: Custom agent: Enforce Pragmatic Test Coverage
The new live-preview delegation is not exercised by the added tests. Both JS test harnesses call SizeFormat.formatFileSize directly without loading live-preview.js, so they do not validate updateMeta's numeric guard or window.SizeFormat integration. Add an integration test that invokes updateMeta with representative byte values and missing/non-number metadata.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At webapp/static/js/live-preview.js, line 810:
<comment>The new live-preview delegation is not exercised by the added tests. Both JS test harnesses call `SizeFormat.formatFileSize` directly without loading `live-preview.js`, so they do not validate `updateMeta`'s numeric guard or `window.SizeFormat` integration. Add an integration test that invokes `updateMeta` with representative byte values and missing/non-number metadata.</comment>
<file context>
@@ -805,7 +805,9 @@
- const size = typeof meta.bytes === 'number' ? `${parseFloat((meta.bytes / 1024).toFixed(1))}KB` : '';
+ // המימוש הקודם חילק ב-1024 פעם אחת והציג תמיד KB, ולכן קובץ של 582
+ // בתים הופיע כ-"0.6KB" ושל 3.5 מגה כ-"3584KB".
+ const size = typeof meta.bytes === 'number' ? window.SizeFormat.formatFileSize(meta.bytes) : '';
this.previewMeta.textContent = [language, size, duration].filter(Boolean).join(' • ');
}
</file context>
Uh oh!
There was an error while loading. Please reload this page.
ארבעה ממצאי ריוויו, כולם אומתו מול הקוד לפני התיקון. 1. עמוד ההשוואה נפל. compare_files.html קורא ל-CompareView.initFilesMode ב-script אינליין שרץ בזמן ניתוח המסמך, ומשם — כשיש קבצים נבחרים מראש — bindFilesEvents קורא ל-updateFilePreview ומגיע ל-formatFileSize מיד. סקריפט דחוי עדיין לא רץ באותו רגע, ולכן: TypeError: Cannot read properties of undefined (reading 'formatFileSize'). שוחזר בדפדפן לפני התיקון. השורש: מודול דחוי אינו יכול לשמש תלות של קוד שרץ בזמן הניתוח. התג ב- base.html איבד את defer — הקובץ שוקל ~5KB, אין לו תלויות, והוא יושב לפני block extra_js שבו יושבים כל הצרכנים. אותו שיקול חל כבר על utils/rtl-code.js ב-repo/base_repo.html. האימות הקודם שלי בדק שכל הקריאות יושבות בתוך פונקציות — והן כן. מה שלא נבדק היה אם מישהו קורא לפונקציות האלה בזמן הניתוח. 2. UNITS והאובייקט המיוצא מוקפאים. הם היו מערך ואובייקט משותפים, וכל סקריפט בעמוד יכול היה לשנות את טבלת היחידות או להחליף את הפונקציה ולשנות בכך את התצוגה בכל ששת הצרכנים. בפייתון המקביל הוא tuple וחסין ממילא. 3. בדיקת ה-bidi דילגה בשקט כש-chromium_executable הוא None. None פירושו "תן ל-Playwright לחפש בעצמו" ולא "אין דפדפן", ולכן בסביבה שהתקינה playwright install chromium כרגיל הבדיקה לא הייתה רצה לעולם. עברה לדפוס של שאר קובצי הדפדפן: נתיב אם יש, אחרת חיפוש עצמי, ודילוג רק אם ההשקה נכשלת. 4. live-preview לא היה מכוסה. הבדיקות קראו ל-SizeFormat ישירות ולא טענו את live-preview.js, ולכן השומר typeof meta.bytes === 'number' לא נבדק כלל. תשתית: tests/test_size_format_consumers_browser.py — טוען את compare.js ואת live-preview.js האמיתיים בסדר הטעינה של האפליקציה, מריץ את האתחול הסינכרוני של compare_files, ובודק את updateMeta על גודל תקין, חסר, ולא-מספרי. הבדיקה שולפת את תג ה-script מ-base.html עצמו ולא כותבת אותו מחדש: מה שנשבר הוא התכונה על התג, ותג שנכתב בקובץ הבדיקה היה ממשיך לעבור אחרי ש-defer יחזור. אומת: החזרת defer מפילה אותה עם השגיאה המקורית. הסרת ההקפאה מ-UNITS ומהאובייקט מפילה כל אחת את הבדיקה שלה בנפרד. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y251xcBYzeYZUimEMKBQsS
There was a problem hiding this comment.
1 issue found across 5 files (changes from recent commits).
You’re at about 91% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="tests/test_size_format_consumers_browser.py">
<violation number="1" location="tests/test_size_format_consumers_browser.py:156">
P3: The meta evaluate runs `call(...)` before returning the dict, so if `livePreviewController` is undefined the whole `page.evaluate` rejects with a generic TypeError and the `meta["controller"] == "object"` guard never gets to report. Compute and assert the controller guard separately (or return the dict before invoking `call`), so a missing controller produces the targeted message instead of an opaque fixture error.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| return el.textContent; | ||
| }; | ||
| out.controller = typeof window.livePreviewController; | ||
| out.small = call({language: 'markdown', bytes: 582}); |
There was a problem hiding this comment.
P3: The meta evaluate runs call(...) before returning the dict, so if livePreviewController is undefined the whole page.evaluate rejects with a generic TypeError and the meta["controller"] == "object" guard never gets to report. Compute and assert the controller guard separately (or return the dict before invoking call), so a missing controller produces the targeted message instead of an opaque fixture error.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tests/test_size_format_consumers_browser.py, line 156:
<comment>The meta evaluate runs `call(...)` before returning the dict, so if `livePreviewController` is undefined the whole `page.evaluate` rejects with a generic TypeError and the `meta["controller"] == "object"` guard never gets to report. Compute and assert the controller guard separately (or return the dict before invoking `call`), so a missing controller produces the targeted message instead of an opaque fixture error.</comment>
<file context>
@@ -0,0 +1,247 @@
+ return el.textContent;
+ };
+ out.controller = typeof window.livePreviewController;
+ out.small = call({language: 'markdown', bytes: 582});
+ out.large = call({language: 'markdown', bytes: 3.5 * 1024 * 1024, duration_ms: 12});
+ out.missing = call({language: 'markdown'});
</file context>
Uh oh!
There was an error while loading. Please reload this page.
✨ תיאור קצר
כרטיס קובץ הציג
105.0 KB— תו נוסף בלי מידע נוסף. בדרך לתיקון התברר ששני דברים גדולים יותר שבורים מתחתיו: הכלל היה משוכפל בשמונה מקומות שנסחפו זה מזה, והמחרוזת עצמה מתהפכת על המסך בתוך טקסט בעברית.📦 שינויים עיקריים
1. שישה מימושים בצד הלקוח אוחדו לאחד
compare.js,global_search.js,live-preview.js,json-formatter.js,repo-browser.jsו-file-form-manager.jsהחזיקו כל אחד מימוש משלו. הם נבדלו בתקרת היחידות, ברווח לפני היחידה ובעיגול — והפיצול הזה ייצר שלושה באגים אמיתיים, שתוקנו בעצם האיחוד:live-preview— חילק ב-1024 פעם אחת בלבד3584KB/0.6KB3.5 MB/582 Bglobal_search— עצר ב-MB2048 MB2 GBrepo-browser— עצר ב-GB3 undefined3 TBהכלל יושב עכשיו ב-
webapp/static/js/utils/size-format.jsונטען משורה אחת ב-base.html, בדיוק כמוutils/animations.jsו-utils/rtl-code.jsהקיימים. כל שבע התבניות שטוענות את הצרכנים יורשות מ-base.html, ולכן לא נדרשה עבודת חוטים בתבניות.2. הערך נקרא בסדר לטיני בכל הקשר
"105 KB"בתוך כרטיס בעברית התהפך על המסך ל-KB 105. אלגוריתם ה-bidi אינו מדביק מספר למילה לטינית דרך רווח ניטרלי: הרווח נופל לכיוון הפסקה, המחרוזת נשברת לשני קטעים, והם מסודרים מימין ← לשמאל.נמדד ב-Chromium, מיקומי ציור בפועל:
105KBהערך עטוף עכשיו ב-LRI/PDI (
U+2066/U+2069) בתוך המחרוזת עצמה, ולא ב-dir="ltr"על האלמנט. הסיבה מדידה ולא סגנונית: לא לכל גודל יש אלמנט משלו.webapp/app.pyבונה"הקובץ גדול מדי לתצוגה (105 KB)"כמחרוזת אחת,file-form-manager.jsבונה"x גדול מדי (מקסימום 2 MB)", ו-live-preview.jsמצרף שלושה שדות ל-textContentיחיד. שם אין על מה לתלותdir, ולכן בידוד בתוך הערך הוא הפתרון היחיד שמכסה את כולם. תווי הבידוד אינם מוסיפים רוחב (נמדד: הפרש 0.02px).המשמעות לקוראי הערך:
"105 KB" in resultעדיין עובד; השוואת שוויון מדויקת דורשת את העטיפה.3. השרת והדפדפן לא הסכימו על 1280 בתים
f"{1.25:.1f}"בפייתון מעגל חצי לזוגי ומחזיר"1.2".(1.25).toFixed(1)ב-JS מעגל חצי כלפי מעלה ומחזיר"1.3". כלומר קובץ של 1280 בתים — גודל אמיתי לגמרי — הוצג1.2 KBמהשרת ו-1.3 KBמהדפדפן.זה נתפס בבדיקה שמריצה את שני המימושים ומשווה, לא בקריאת הקוד. שני הקבצים נראים זהים לחלוטין; הם פשוט נשענו כל אחד על ברירת המחדל של שפתו. העיגול כתוב עכשיו במפורש בשתי השפות באותן פעולות על אותם doubles.
מה לא שונה, בכוונה
TextUtils.format_file_sizeב-utils.pyמזין את הודעות הבוט בטלגרם ולא את הוובאפ, ושני טסטים מתעדים שם את ההתנהגות הקיימת ("1.0 KB"). המשמעות: אותו קובץ יוצג1.3 KBבוובאפ ו-1.2 KBבבוט. זו החלטת מוצר נפרדת ולא משהו שנכנס בשקט לתוך תיקון בוובאפ — מסומן כהמשך.🧪 בדיקות
tests/size-format.test.js(חדש) — סולם היחידות, העיגול, חיתוך ה-.0והבידוד. רץ בג'ובJS Tests (node)הקיים. 19 בדיקות.tests/test_file_size_display.py— צד השרת על כל צרכניו, ובדיקה שמריצה אתsize-format.jsהאמיתי ב-node ומשווה ערך מול ערך. זו הבדיקה שתפסה את פער העיגול. 19 בדיקות.tests/test_size_format_bidi_browser.py(חדש) — סדר הציור בדפדפן אמיתי, על מה שהשרת שולח ועל מה שהדפדפן מחשב. סדר bidi הוא משהו שהדפדפן אוכף ו-Python אינו רואה, ולכן בדיקת יחידה כאן אינה ראיה.from-server, ו-16 מ-19 בבדיקת ה-JS. שחזור החזיר את כולן לירוק.werkzeugוהועלה/tools/jsonבכרומיום:status=200,document.documentElement.dir=rtl,window.SizeFormatנטען,formatFileSize(107520)החזיר את הערך המבודד, והוא צויר בסדר הנכון (105 ב-x=1166, KB ב-x=1197). אפס שגיאות JS בעמוד.compare.jsו-repo-browser.jsנטענים בליdefer, והמודול המשותף עםdefer. נמדד: ברגע ה-parse של הצרכןwindow.SizeFormatבאמת עדייןundefined, ובזמן הקריאה הוא כבר קיים והפונקציה עובדת — כי כל שש הקריאות יושבות בתוך פונקציות ולא ברמת המודול.*.test.jsשל הריפו הורצו כפי ש-CI מריץ אותם — ירוקים.📝 סוג שינוי
✅ צ'קליסט
AI-MAP.md| המשפט:grepעלformat_file_size/formatBytes/humanSizeבכלdocs/ו-AI-MAP.mdלא החזיר דבר — אין עמוד שמתעד את עיצוב גדלי הקבצים, ולכן לא נדרש עדכון תיעוד. הכלל וההנמקה של הבידוד מתועדים ב-docstring שלwebapp/size_format.pyובראשsize-format.js.🧩 השפעות/סיכונים
live-previewמקבל רווח ויחידה נכונה (3.5 MBבמקום3584KB)./filesמשתמשת ב-in, והיא עוברת.🔗 קישורים
.0נולדה מהערת ריוויו על הכפילות, ומבדיקה שלה מול הקוד.🧯 סיכון / החזרה לאחור (Rollback)
git revertלשני הקומיטים. הם עומדים בפני עצמם ואינם נוגעים בשום דבר אחר.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y251xcBYzeYZUimEMKBQsS
Summary by Sourcery
Standardize webapp file-size display and ensure formatted values remain consistent and readable across Hebrew interfaces.
Bug Fixes:
Enhancements:
Documentation:
Tests: