8000 Comparing mailtobalajiraghavan:master...abidzk01:master · mailtobalajiraghavan/pdf-studio · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mailtobalajiraghavan/pdf-studio
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: abidzk01/cool-pdf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 55 files changed
  • 1 contributor

Commits on Nov 7, 2026

  1. Add: vendor runtime assets locally, real AES-256 encryption and a val…

    …idation gate
    
    Load the three libraries and the Inter font from vendor/ instead of a CDN, so the
    page has no third-party origin and the CSP can be tightened to 'self'.
    
    Swap pdf-lib 1.17.1 for the API-compatible MIT fork @cantoo/pdf-lib 2.11.1:
    upstream silently ignored save({userPassword}), so Protect emitted unencrypted
    files and Unlock could not read encrypted ones. Protect now calls encrypt()
    (AES-256, ISO 32000-2 R6); Unlock rebuilds a fresh document to strip /Encrypt.
    
    Add one validation gate for every tool (LIMITS, clampInt, isPdfName,
    hasPdfMagic, readPdfFile, normalizeRange): extension, size, %PDF- magic bytes
    and a real parse before bytes reach PDF code, plus clamping for watermark and
    page-number inputs and range/merge-count limits.
    
    Fix Split's 'selected pages' mode, which exported every page instead of the
    user's selection. Add tools/serve.py because python -m http.server on Windows
    serves .js as text/plain, which blocks the Blob worker's importScripts.
    abidzk01 committed Nov 7, 2026
    Configuration menu
    Copy the full SHA
    6b23f4f View commit details
    Browse the repository at this point in the history
  2. Docs: add architecture guide, agent rules, skills and rewrite README

    docs/ARCHITECTURE.md documents the repository layout, the S state model, the
    Blob-worker protocol, all eight PDF pipelines, the validation gate, the security
    model, memory behaviour, twelve known gaps and a manual QA matrix.
    
    .opencode/rules.md is the normative rule set (invariants, code style, JavaScript,
    UI including a Tailwind policy, validation, security, review checklist) and is
    registered as project instructions by .opencode/opencode.jsonc. Two custom
    skills cover tool development and privacy/security audits.
    
    README.md is rewritten around the current stack: local vendoring, AES-256,
    requirements (including the dev server), folder structure, naming conventions
    and how to use the OpenCode agents and skills. SECURITY.md and CONTRIBUTING.md
    drop the CDN/SRI guidance and document the vendored assets and MIME caveat.
    abidzk01 committed Nov 7, 2026
    Configuration menu
    Copy the full SHA
    b110e5e View commit details
    Browse the repository at this point in the history
  3. Add: rebrand to RxPDF Cool and open straight on the tools

    Use the brand assets from assets/: icon-rxpdf-cool.png as the topbar mark, plus
    favicon.ico, favicon-32x32.png and favicon-rxpdf-cool.png for the tab and Apple
    touch icon (this also removes the old favicon 404).
    
    Replace the full-viewport landing page and bento grid with a compact sticky
    topbar (brand + privacy badge + theme switch) and a one-paragraph hero with fact
    chips, followed immediately by the tabs and drop zones. No onboarding screen or
    scroll-to-start cue; the tool is visible on first paint, including on mobile
    where the tab strip scrolls horizontally and keeps the active tab in view.
    
    Fold the tool descriptions that lived in the marketing cards into per-panel info
    boxes (Split, Merge, Watermark, Page Numbers) so the page stays informative.
    
    Clean up what the old landing needed: delete the hl-/bt-/rv- CSS, the spotlight
    handler, scrollToTools, the window.setTheme monkey patch and the reveal
    observer; setTheme now drives the single theme group, and switchTab lost its
    superseded matching pass. Update meta/JSON-LD (AES-256, no third-party URLs),
    footer, docs, README, agent rules and skills for the new name and layout.
    abidzk01 committed Nov 7, 2026
    Configuration menu
    Copy the full SHA
    a6eefe8 View commit details
    Browse the repository at this point in the history
  4. Add: signature pad and overlay PDF editor

    New 'Edit' tab with a shared overlay engine. Sign draws with Pointer Events
    (mouse, trackpad, stylus or touch) on a DPR-scaled canvas, crops to the stroke
    bounding box and embeds a transparent PNG. Text, images, rectangles, ellipses,
    lines, freehand ink, highlights and cover boxes can be placed, moved, resized,
    duplicated, reordered and undone (40-step history).
    
    Pages can be rotated, duplicated, inserted (blank), deleted and reordered
    through a page plan that keeps the source untouched; metadata (title, author,
    subject, keywords) is editable. Save copies the plan into a new document and
    flattens every object through the pdf.js viewport, so coordinates survive
    rotation and CropBox offsets. Cover is documented as a cover, not redaction.
    
    Limits live in EDIT_LIMITS: 300 MB/500 pages (warn), 600 objects, 500 chars,
    5 MB images, 400 signature strokes. Editor state is isolated in S.edit and
    S.signPad; the tool is wired into validation, drag-and-drop, progress and the
    busy lock. Docs, rules, skills and README updated for nine tools.
    abidzk01 committed Nov 7, 2026
    Configuration menu
    Copy the full SHA
    a455eec View commit details
    Browse the repository at this point in the history
  5. Refactor: split CSS and JS by concern, keep index.html as a markup shell

    index.html drops from ~3,200 to ~570 lines: it now only holds the head,
    topbar, hero, tabs, panels, signature modal and footer, and links the assets.
    
    CSS is split by concern into assets/css/: theme (tokens/font/reset), layout
    (shell/topbar/hero), components (tabs/cards/drop zones/buttons/toasts/forms),
    editor (overlay editor + signature modal) and responsive (media queries, loaded
    last). JS is split into js/: core (validation, S state, helpers, theme, tabs,
    drag & drop, downloads, progress, worker), split, merge, tools (compress,
    images, watermark, page numbers, protect, unlock), editor and app (init and
    listeners).
    
    Scripts stay classic and load in dependency order, so they share one global
    scope with a single declaration per name; there is still no bundler, module
    transform or build step. Docs, rules, skills, README, SECURITY and CONTRIBUTING
    describe the new layout and the load-order rules.
    
    Verified after the split: all five stylesheets and six scripts load, zero
    console errors, Split runs through the Blob worker, and the editor draws a
    signature, saves, and the output reopens with extractable text.
    abidzk01 committed Nov 7, 2026
    Configuration menu
    Copy the full SHA
    729a998 View commit details
    Browse the repository at this point in the history
  6. Add: bilingual English/Indonesian UI, support button and profile link

    Add a dependency-free i18n layer: English is the source language, markup uses
    data-i18n (plus placeholder/title/aria variants) and JS calls t(), with 267
    English->Indonesian entries in js/i18n-data.js. applyI18n() also updates the
    title, meta description and Open Graph/Twitter titles, and calls
    refreshDynamicTranslations() so the page grid, parts summary, merge list, editor
    labels and props re-render on switch.
    
    Language comes from ?lang= or navigator.language; switching rewrites the query
    string with history.replaceState, so no localStorage/cookie is introduced.
    <html lang> and the EN/ID aria-pressed state stay in sync.
    
    Add a Support button in the topbar pointing to https://teer.id/rxdiag and
    footer links to https://rxdiag.my.id and the support page, both with
    target=_blank and rel=noopener noreferrer.
    
    Add tools/check-i18n.js to fail on missing keys or unwrapped toast literals,
    and update README, ARCHITECTURE (load order + i18n section), rules, skills,
    SECURITY and CONTRIBUTING. Verified EN/ID switching with a live document,
    editor labels, dynamic page labels, mobile layout and zero console errors.
    abidzk01 committed Nov 7, 2026
    Configuration menu
    Copy the full SHA
    e7e732c View commit details
    Browse the repository at this point in the history
  7. Fix: persist the language choice and bust asset caches on deploy

    Language: setLang() now stores the choice in localStorage['rxpdf.lang'] and
    initLang() restores it, with precedence ?lang= > stored > navigator.language >
    en. The query string is still rewritten so a page URL stays shareable, and
    storage access is wrapped in try/catch for private mode/file://. This key is the
    only thing the app stores; docs and rules now state that exception explicitly
    (no PDF bytes, names, passwords, cookies or telemetry).
    
    VPS cache: index.html now links all 13 first-party CSS/JS files with
    ?v=<sha256-8> via tools/stamp-assets.js (idempotent, with a --check mode).
    netlify.toml makes index.html revalidate and caches assets/js/vendor
    immutably, and deploy/ ships nginx/apache examples plus a checklist for the
    classic 'styles did not update' causes (partial upload, cached index.html).
    
    Verified: only rxpdf.lang is stored, reload restores ID/EN, ?lang= overrides,
    all stylesheets/scripts carry hashes, i18n check passes, zero console errors.
    abidzk01 committed Nov 7, 2026
    Configuration menu
    Copy the full SHA
    6345e04 View commit details
    Browse the repository at this point in the history
  8. Add: compression modes with size control (lossless, balanced, small, …

    …target, percentage)
    
    Compress now offers five modes instead of a single re-save:
    
    - Lossless keeps the current behaviour (structure only, text stays selectable).
    - Balanced rasterizes at 150 DPI / q0.70, Small at 100 DPI / q0.55.
    - Target size takes KB/MB and Percentage takes 5-90% of the original; both run a
      bounded search (<=3 DPI candidates x <=5 quality steps) that measures the real
      output every step and prefers the largest file that still fits.
    - Pages are rendered once per DPI into JPEG masters (32 MP cap, 300-page limit)
      and only re-encoded during the search, so the PDF is not re-rendered per step.
    - Results are always reported honestly: 'Compressed to X (target Y)' or 'Could
      not reach Y - smallest was Z at N DPI'; Balanced growing a file says so and
      suggests Small or a lower target instead of claiming success.
    - Lossy modes show a warning that text, links, forms, annotations and bookmarks
      are lost, the drop zone now loads the file before compressing, and a preview
      shows 'before -> target' for target/percentage.
    
    All processing stays client-side: pdf.js renders, canvas encodes, pdf-lib
    assembles; no server and no new dependency. Added the mode/limit strings to the
    EN/ID dictionary, fmtBytes now reports bytes under 1 KB, and docs, rules and the
    skill checklist cover the modes, limits and trade-offs.
    
    Verified with a 1.49 MB image-heavy fixture: Small 720 KB, target 600 KB -> 575
    KB, target 50 KB -> warning at 272 KB, 30% -> 432 KB (target 436 KB), lossless
    unchanged; text extraction empty after a lossy pass; 0 console errors.
    abidzk01 committed Nov 7, 2026
    Configuration menu
    Copy the full SHA
    e4974ff View commit details
    Browse the repository at this point in the history
  9. Release: v1.0.0 with PWA install, offline cache, versioning and SEO

    PWA:
    - manifest.webmanifest with relative id/start_url/scope, standalone display,
      192/512 + maskable icons and four ?tab= shortcuts.
    - sw.js precaches the shell, hashed CSS/JS, vendor libraries, pdf.js worker,
      Inter font and icons; navigation is network-first with a cached fallback,
      hashed assets are cache-first, everything else stale-while-revalidate.
    - assets/pwa icons are generated from the brand mark by
      tools/make-pwa-icons.js (alpha-aware PNG decoder/scaler/encoder, no deps).
    - js/pwa.js registers the worker, shows the topbar Install button on
      beforeinstallprompt, reports appinstalled, exposes an offline-ready badge, and
      only activates a waiting update when the page is idle.
    - netlify/nginx/apache configs revalidate sw.js and the manifest and serve
      application/manifest+json.
    
    Versioning:
    - VERSION (1.0.0) is the single source, stamped into core.js (footer),
      manifest.webmanifest, the service-worker cache name and every asset URL.
    - tools/stamp-assets.js now rewrites hashes, the SW precache list, the cache
      version and the version fields in one pass; --check validates all of them.
    - CHANGELOG.md follows Keep a Changelog; README documents the release flow.
    
    SEO:
    - sitemap.xml, robots.txt and llms.txt for https://pdf.rxdiag.my.id/, plus
      canonical, og:url and JSON-LD url in index.html.
    
    Verified: manifest 200 as application/manifest+json, three icons 200, SW active
    with 29 precached entries, install prompt wired, offline reload keeps CSS, font,
    all libraries and a working lossless compress, no console errors; i18n and
    stamp checks pass.
    abidzk01 committed Nov 7, 2026
    Configuration menu
    Copy the full SHA
    625ba60 View commit details
    Browse the repository at this point in the history
Loading
0