Spaces:
Sleeping
Sleeping
Commit History
-
Make findings tables easier to interpret
ClaudeUnverified signature- Status badges: 'status' cells render as colored pills — green (OK, decorative), amber (weak, vague, bare URL), red (missing, duplicate, empty) — so problems jump out of long reports. Terse codes get human labels (URL_AS_TEXT -> 'bare URL'). - Friendly XML-part names: 'file' cells show 'Layout 5' / 'Master 1' / 'Slide 3' / 'Presentation' instead of raw zip paths; full path stays in a tooltip. - Row tinting: the PPTX lang runner marks non-target-language rows with _flag, and the UI tints them amber — the rows that will actually change are instantly visible. Smoke test 7/7; flag and statuses verified.84762f6 -
fix_pptx_lang_tags: per-XML-part breakdown in the findings table
ClaudeUnverified signatureThe findings table for the PPTX language tool now shows one row per (XML part, language) pair instead of a per-language total — so you can see exactly which slide/layout/master XML files contain each tag and how many occurrences live in each. Rows are sorted with non-target languages first (the ones actually being changed), then by occurrence count desc. Smoke test 7/7.299af37
-
Suggest other audits after an audit result
ClaudeUnverified signatureThe four read-only PPTX checks (check_slide_titles, check_hyperlinks, check_font_size, report_alt_text) now carry an 'audit' flag (exposed via /api/tools). After an audit result renders, a 'Run another audit on this file:' chip row appears listing the other audits — one click switches the tool and submits, so stacking audits on a single deck is one-click discoverable rather than a hidden feature of the kept-upload behavior.c4f6326 -
Group the four new tools under a Beta section in the UI
ClaudeUnverified signatureMarked check_slide_titles, check_hyperlinks, check_font_size, and set_pdf_title with a `beta` flag (exposed via /api/tools). The frontend now lists stable tools under PowerPoint/PDF and these four under a separate "Beta (experimental)" optgroup, and prefixes a selected beta tool's description with "Beta ·".f9d1602 -
Add four accessibility checks/tools (now 14 tools)
ClaudeUnverified signature- check_slide_titles (pptx): reports slides with missing/empty or duplicated titles — key for screen-reader navigation. Read-only. - check_hyperlinks (pptx): flags non-descriptive link text ("click here", bare URLs, empty). Read-only. - check_font_size (pptx): reports runs below a minimum point size (default 18, configurable); runs with inherited sizes are counted as undetermined. Read-only. - set_pdf_title (pdf): sets the document title (/Info + XMP) and enables the DisplayDocTitle viewer preference so readers show the title, not the filename (PDF/UA). Produces a file. All wired into the registry/runners with structured reports; CLIs included. Smoke test bumped to 14 tools (7/7), acronym tests pass, all four verified on a purpose-built deck/PDF.e553423 -
Surface the built-in acronym list in the UI
ClaudeUnverified signatureThe "Keep acronyms" help text said a built-in list always applies, but there was no way to see it. Added GET /api/acronyms (served from acronyms.txt) and a lazy-loading "View the built-in acronym list" expander under the keep field that shows the preserved acronyms as chips. README links the source file too. Verified: endpoint returns the 72-entry sorted list, the option exposes the show_acronyms flag, smoke test 7/7.169d8a2 -
Minor robustness fixes: B4, B5, S5
ClaudeUnverified signatureB5: fix_pdf_lang_tags now escapes the target language for the PDF content- stream literal string, so a value containing '(' ')' or '\\' can't malform the stream (the dictionary path already escaped via pikepdf.String). B4: a background task sweeps abandoned result files every 10 min via the app lifespan, so idle downloads are cleaned even with no further requests (was only swept at the start of the next run). S5: uploads are now content-checked by leading bytes (%PDF / PK zip header), not just extension, so files that don't match their claimed type are rejected before reaching a parser. Verified: garbage .pptx rejected as invalid, PDF target with parens stays a valid PDF, sweeper starts with the app, smoke test 7/7, acronym tests pass. B3 (lone 'i'->'I') investigated and dropped: _to_mixed_case output is identical to str.title() in every 'i' case, so there is no real defect.bc4fb4f -
Sanitize error responses, guard env var, drop runtime pip (S2/B1/S3)
ClaudeUnverified signatureS2: unexpected runner failures and the 500 handler no longer echo raw exception text (which could include temp paths/internals) to the client. The full traceback is logged server-side; the client gets a generic message. Intentional ToolError messages are still shown as before. B1: MAX_UPLOAD_MB now falls back to 100 on a non-numeric value instead of crashing the app at startup. S3: removed the os.system("pip install lxml ...") ImportError fallbacks in fix_slide_number_order and fix_math_italics (lxml is a declared dependency); dropped the now-unused os import. Verified: corrupt upload yields a generic per-file error (traceback logged), both CLIs still run, smoke test 7/7, acronym tests pass.99f30ce -
Offload processing to a threadpool; thread-safe report capture
ClaudeUnverified signatureS1: /api/run ran the CPU-bound tool synchronously inside an async endpoint, so one large/slow file blocked the event loop and every other request (including /api/health). The runner now runs via run_in_threadpool, freeing the loop. B-F: that fix exposed a latent bug — report capture used a process-global redirect_stdout, which would interleave across concurrent threads. Replaced it with a thread-local stdout/stderr proxy: each run captures only its own output; writes outside a capture (and other threads) go to the real streams. Verified: two threads printing 200 interleaved lines each show zero cross-talk; smoke test 7/7; acronym tests pass.5c63056 -
Add a per-file upload size limit
ClaudeUnverified signatureUploads are now capped per file (default 100 MB, configurable via the MAX_UPLOAD_MB env var) and enforced while streaming to disk, so an oversized file is rejected mid-transfer with HTTP 413 instead of landing in full. The work dir is cleaned up on rejection. /api/tools advertises the limit; the UI shows it and pre-checks file sizes before uploading. Verified: 413 on over-limit upload (with cleanup), normal uploads unaffected, smoke test 7/7.87a4624 -
Flag filename-like alt text as WEAK
ClaudeUnverified signaturereport_alt_text now distinguishes alt text that is just an image filename (e.g. python-pptx's auto-filled "dot.png") from a real description: such images get a WEAK status and their own count, so reviewers don't mistake a filename for genuine alt text. The heuristic only flags text ending in an image extension, so prose like "See diagram.png in the appendix" stays OK.359428c -
Add alt-text reporter tool
ClaudeUnverified signaturetools/pptx/report_alt_text.py scans a deck and reports every image's alt-text status (OK / DECORATIVE / MISSING), reusing the same descr/decorative detection as the HTML exporter. Read-only — produces a structured findings report (slide, shape, status, alt_text) and no output file. Wired into the registry and runners as the 10th tool; usable from the CLI too. Verified: OK, DECORATIVE, and MISSING paths all detected; smoke test updated to expect 10 tools (7/7 green).4e7642c -
Structured reports instead of scraped stdout
ClaudeUnverified signatureRunners now return a structured RunResult (summary, counts, findings table rows + columns, and a collapsible raw_log) rather than a captured-text blob. The structured data comes from each tool's return value or an additive, non-breaking hook (an optional changes list, or a return dict where the function previously returned None) — the CLIs are byte-for-byte unchanged. - tools: convert_caps/replace_allcaps/remove_footer_text expose before->after changes; fix_pptx_lang_tags/fix_pdf_lang_tags return their findings counters; fix_math_italics returns structured replacements; fix_slide_number_order lists the slides it reordered. - API: /api/run/{tool} now returns one structured block per file (unifying single + batch); per-file errors are reported in-band rather than aborting. - frontend: renders summary, count chips, a findings table, and a "Show log" details pane per result. Verified: structured output end-to-end, all CLIs unchanged, acronym tests and smoke test (7/7) green.154b1f0 -
Add batch processing (multi-file upload -> zip)
ClaudeUnverified signature- /api/run/{tool} now accepts multiple files. One file returns that file directly (unchanged); multiple files are processed independently and zipped, with arcname de-duplication and a combined per-file report. Per-file errors are captured in the report so one bad file doesn't sink the batch. - Frontend: file input accepts multiple; status shows the file count. - smoke_test.sh: switch to the `files` field and add a batch (zip) check. Smoke test green (7/7), including batch.7246dc8 -
Wire all 9 tools into the FastAPI web app
ClaudeUnverified signature- runners.py: adapter layer that loads each CLI tool by file path (so tools/pptx never shadows the python-pptx package) and wraps its existing core function, capturing printed output as the report and normalising the report-only / dry-run / no-output cases. - registry.py: metadata + option schema + runner for each of the 9 tools. - main.py: POST /api/run/{tool} (multipart upload + typed options) and GET /api/result/{id} (download then clean up); /api/tools serves schemas. - frontend: tool picker + dynamic option fields, upload, report, download. - fix_slide_number_order: extract importable process_pptx() from main(). - replace_allcaps_pptx: fix double ._element deref in clear_font_allcaps (the script was previously untested and crashed on any run). All 9 tools verified end-to-end through the HTTP API with sample files.8bc7d4e -
Scaffold PPTX/PDF accessibility tools web app
ClaudeUnverified signatureLays out the structure from CLAUDE_CODE_BRIEF.md without implementing tool logic: empty FastAPI app with /api/health and /api/tools, static frontend stub, empty tool registry, Dockerfile + docker-compose with qpdf baked in for pikepdf. Existing CLI scripts moved into tools/.307de64