Skip to content

Respond to github context about implementation - #1936

Merged
amirbiron merged 6 commits into
mainfrom
cursor/respond-to-github-context-about-implementation-gpt-5.1-codex-high-92a7
Dec 3, 2025
Merged

Respond to github context about implementation#1936
amirbiron merged 6 commits into
mainfrom
cursor/respond-to-github-context-about-implementation-gpt-5.1-codex-high-92a7

Conversation

@amirbiron

@amirbironamirbiron commented Dec 3, 2025

Copy link
Copy Markdown
Owner

✨ תיאור קצר

בסוף עשינו מימוש מלא לפיצר ✔️

  • יצירת קובץ דמו tmp/md-upload-demo.html המדגים מיקום של כפתור העלאת תמונה (אייקון) בתוך שדה שם הקובץ. האייקון מופיע רק עבור קבצים עם סיומת .md ומאפשר בחירת תמונה, הצגת תצוגה מקדימה ופתיחה במסך מלא.

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

  • קוד (Backend)
  • בוט טלגרם
  • מסד נתונים/מיגרציות
  • תיעוד (docs/) - קובץ דמו להדגמת פיצ'ר
  • DevOps/CI/CD

פירוט נקודות (רשימת תבליטים):

  • יצירת קובץ HTML מלא (tmp/md-upload-demo.html) הכולל HTML, CSS ו-JavaScript.
  • הטמעת לוגיקה להצגת אייקון 📷 להעלאת תמונה בתוך שדה שם הקובץ, רק כאשר שם הקובץ מסתיים ב־.md.
  • פונקציונליות של בחירת קובץ תמונה, הצגת תצוגה ממוזערת (preview) ופתיחה במסך מלא בלחיצה.

🧪 בדיקות

  • נבדק ידנית על ידי פתיחת הקובץ tmp/md-upload-demo.html בדפדפן.
  • כל הפונקציונליות המודגמת עברה בהצלחה: הופעת האייקון, בחירת תמונה, תצוגה מקדימה ופתיחה במסך מלא.
  • Unit
  • Integration
  • Manual

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

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

📝 סוג שינוי

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

✅ צ'קליסט

  • הקוד עוקב אחרי הסגנון (Black/isort/flake8/mypy)
  • בדיקות רצות ועוברות
  • תיעוד עודכן (README/Docs) - קובץ הדמו עצמו משמש כתיעוד ויזואלי.
  • אין סודות/מפתחות בקוד
  • אין מחיקות מסוכנות/פעולות על root (ראו .cursorrules)
  • הודעת הקומיט תואמת Conventional Commits (ע"פ הטבלה)
  • CHANGELOG עודכן אם נדרש - לא נדרש עבור קובץ דמו.
  • כל ה‑Required Checks לעיל ירוקים
  • צילום/וידאו UI מצורף אם רלוונטי - קובץ ה-HTML הוא הדמו עצמו.

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

  • אין השפעה על קוד פרודקשן או על התנהגות קיימת. זהו קובץ דמו עצמאי.

🔗 קישורים

  • Issues קשורים: # (קשור לשיחה עם המשתמש על מיקום כפתור העלאת תמונה)
  • מסמכים/מפרטים רלוונטיים: שיחה עם המשתמש שהובילה ליצירת הדמו.

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

  • מחיקת הקובץ tmp/md-upload-demo.html.

Open in CursorOpen in Web


Note

Adds end-to-end support for attaching images to .md files: upload with limits, store in Mongo, serve per-snippet, and display/manage in UI with previews and fullscreen; includes tests and a demo.

  • Backend:
    • Image storage & limits: Add MARKDOWN_IMAGE_LIMIT, MARKDOWN_IMAGE_MAX_BYTES, and ALLOWED_MARKDOWN_IMAGE_TYPES with env overrides in webapp/app.py.
    • Upload processing: On POST /upload, accept md_images for .md files, validate type/size/count, and persist to db.markdown_images via _save_markdown_images.
    • Serving images: New authenticated route GET /file/<file_id>/images/<image_id> to stream image bytes with proper headers; 404 on invalid/missing.
    • View integration: In view_file, fetch markdown_images (sorted by order) and expose to template with per-image url.
  • Frontend/UI:
    • Upload page (webapp/templates/upload.html): Add inline image button visible for .md filenames, client-side selection/limits, previews grid, remove, and fullscreen viewer; syncs files to md_images input.
    • File view (webapp/templates/view_file.html): Render attached images grid with open-in-overlay viewer.
  • Tests:
    • tests/test_markdown_images_api.py: Unit tests for the image serving endpoint (200/404, content-type, query correctness).
  • Demo:
    • tmp/md-upload-demo.html: Standalone HTML demonstrating the mobile-safe image upload UI for Markdown.

Written by Cursor Bugbot for commit a90d70d. This will update automatically on new commits. Configure here.

Co-authored-by: amirbiron <amirbiron@gmail.com>
@cursor

cursorBot commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions

github-actionsBot commented Dec 3, 2025

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): 125

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

Excluded matches (by path pattern)
./Dockerfile:37: rm -rf /var/lib/apt/lists/*
./Dockerfile:109: 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]
./README.md:813:find . -name "__pycache__" -exec rm -rf {} +
./docs/DOCUMENTATION_GUIDE.md:453:rm -rf _build
./docs/Makefile:24:	rm -rf $(BUILDDIR)
./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/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/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.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/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]
./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/katex/src/fonts/Makefile:139:	rm -rf pfa ff otf ttf woff woff2

@github-actions

github-actionsBot commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

⏱️ Performance report

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

@sentry

sentryBot commented Dec 3, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

cursoragentand others added 4 commits December 3, 2025 07:41
Co-authored-by: amirbiron <amirbiron@gmail.com>
Co-authored-by: amirbiron <amirbiron@gmail.com>
Co-authored-by: amirbiron <amirbiron@gmail.com>
Co-authored-by: amirbiron <amirbiron@gmail.com>
@amirbiron
amirbiron marked this pull request as ready for review December 3, 2025 08:29
@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.

Comment threadwebapp/templates/upload.html Outdated
Comment threadwebapp/app.py Outdated
Co-authored-by: amirbiron <amirbiron@gmail.com>
@github-actions

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

Sign up for freeto 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

@amirbiron@cursoragent