Skip to content

ClearPDF v1.2.0 — text selection, decrypt animation, onboarding polish, crash fix - #12

Merged
Chethan616 merged 43 commits into
mainfrom
claude
Aug 21, 2026
Merged

Chethan616 merged 43 commits into
mainfrom
claude

Conversation

@Chethan616

@Chethan616 Chethan616 commented Aug 21, 2026 •

Copy link
Copy Markdown
Owner

ClearPDF v1.2.0

First release after v1.1.0-liquid-glass. Bumps to versionName 1.2.0 / versionCode 3.

✍️ Text selection — premium rework

  • Drag to select multiple words. In Select Text mode the page no longer scrolls, so a drag now sweeps a real reading-order selection (word → sentence → paragraph) live under your finger, instead of one word per tap. Tap = word, double-tap = line, long-press = paragraph still work.
  • Delete a highlight. Tapping a word that's already highlighted now shows a Delete action in the pill (previously only Copy/Highlight appeared); Highlight becomes Recolor in that state.

🐞 Crash fix — large / encrypted PDFs

  • Fixed the app crashing while scrolling large or password-protected PDFs. A big page could throw OutOfMemoryError (an Error, not an Exception) that the renderer's catch let escape; it now catches Throwable, recycles partial bitmaps, and guards openPage. Text extraction is also serialized behind a Mutex so eager loading + fast scrolling can't stack several full-document parses in RAM.

🎬 Opening a document

  • Removed the loading indicator entirely — opening a PDF is a clean dark fill that dissolves to the first page (no picker flash, no spinner).
  • Decrypting a password PDF plays a blue liquid-glass scan animation.

🎨 Onboarding & Home polish

  • Page 1 (book): shadow disabled for that page (it used to snap in when the book finished), and the book's lines now take the colours of the sheets that formed it, in sequence.
  • Page 4: replaced the generic file-kind list with one liquid-glass document card that morphs through PDF → Word → Excel → PPT → Image.
  • Home: container shadows now fade in with their panels instead of snapping in at the end of the entrance.
  • Editor toolbar: the tool pills bounce with the share capsule's spring when the share button opens.

🌍 Community-requested (context for the release)

These drove the release; see the release notes for the user-facing summary: open Office docs, custom background option, PDF e-signing, Portuguese (Brazil).


🤖 Generated with Claude Code

Chethan616 and others added 29 commits August 16, 2026 23:19
- Fix sign/image placement to land on the page under the viewport center
  (viewportPlacementTarget) instead of off-screen firstVisibleItemIndex.
- Centralize sizing/clamping in placeImageMarkup; clamp cross-page drags
  to the page bounds so annotations no longer clip behind the next render.
- Make active-image tools page-robust via activeImageLoc scan-by-id.
- Tap-to-edit any placed markup (image/text/note/shape) in None mode.
- Add colour editing (AnnotationEditorDialog + ShapeEditorPopup) and a
  generic select -> move/resize transform system for shapes/text/notes.
- Save Edits sheet reworked to the Insert-Text glass family (adaptive fg).
- Search highlight refined to Acrobat-style two-tier active/secondary pills;
  per-char word rects via PdfTextService charLefts/charRights.
- Fix stale colour capture in draw gesture (key includes colour/stroke).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The bottom toolbar's undo and all page-scoped OCR/highlight actions keyed
off getPageMarks(state.currentPage), an async mirror updated via
snapshotFlow{firstVisibleItemIndex}.collect{onPageChanged}. Drawing and
placement inside each LazyColumn item use the synchronous page item index.
Right after open/scroll, before the flow settled, the two diverged, so undo
removed from the wrong (empty) page list and no-op'd until the PDF was
reopened.

Switch currentPageMarks, selectedTextCount/currentSelectedIds, select-all,
copy, highlight/underline/strike, clear-selection, onSetActiveTool's
clearOcrSelection, and the "Page X / Y" pill to the synchronous
currentPageIndex (listState.firstVisibleItemIndex). state.currentPage is
kept only for the async OCR-extraction trigger.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rewrite SettingsScreen around three reusable primitives and centralized
tokens, preserving every backing call and the function signature:

- SettingsSection: glass card + M3 rounded-icon tile header + optional
  trailing slot (used by the quality % badge). Replaces 7 ad-hoc headers.
- SegmentedSelector/SegOption: one equal-weight glass segmented control
  shared by theme, language, and save-location. Replaces 3 copy-pasted
  blocks; consistent maxLines=1 + ellipsis overflow handling.
- reveal(index): one staggered fade+rise entrance modifier replacing 12
  hand-written animateFloatAsState/graphicsLayer blocks, and fixing a bug
  where Quality and Language both reused panel4's animation.

Centralize section radius/spacing/padding/type/accent tokens. Add overflow
guards to section titles and the save path. No settings behavior changed;
no fake settings added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove accidental scratch/AndroidLiquidGlass gitlink (mode 160000, no
  .gitmodules) - a vendored clone of a dependency; gitignore scratch/.
- Delete dead PdfPageCanvas.kt (797 lines): the continuous viewer uses
  PdfContinuousPage; the old canvas was referenced only in a comment.
- Remove completed SCAN_IMPLEMENTATION_PLAN.md (scanner is shipped).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add components/GlassPrimitives.kt as the shared design system:
- GlassDimens: centralized spacing / corner-radius / type tokens.
- Modifier.glassSection(isLight): the solid section card (was private to Settings).
- GlassSectionHeader: M3 rounded icon-tile header with optional trailing slot.
- GlassChip: tinted value pill (e.g. the quality % badge).
- ToolScaffold: the animated back-header + staggered reveal + scroll body that
  every tool screen hand-rolled (~45 lines each).

Adopt in SettingsScreen (drop its private liquidGlassSection + inlined header
+ badge in favor of the shared primitives) and CompressPdfScreen (ToolScaffold +
GlassChip). Structurally-different screens (reorderable/grid/no-reveal/no-back)
keep their bespoke shells for now and can adopt incrementally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an end-to-end text-watermark tool, the highest-value self-contained gap
from the Pdf_Tools audit. Original code built on the app's existing PDFBox
text-stamp export path.

- pdf-core/watermark/PdfWatermarker: stamps a page-centered watermark on every
  page via PDPageContentStream (APPEND) + PDExtendedGraphicsState alpha for
  opacity + PDType1Font.HELVETICA_BOLD; diagonal 45° via Matrix rotation about
  the page centre; font scales to the short edge; source URI untouched.
- WatermarkPdfViewModel: text/opacity/diagonal state; saves via SaveLocationManager
  (custom folder or Downloads) + RecentFilesManager, matching Compress/PdfToImages.
- WatermarkPdfScreen: built on the new ToolScaffold primitive (text field, opacity
  slider + GlassChip, diagonal toggle, apply, open-output).
- Wiring: nav route, Tools grid card (BrandingWatermark), and en/pt/pt-rBR strings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rewrite SettingsScreen from scratch in the iOS "inset grouped" idiom:
- Large navigation title, grouped rounded cards with uppercase section
  headers and gray footnotes, inset hairline separators.
- Colored SF-Symbol-style icon tiles (29dp rounded squares) per row.
- Native-feeling UISegmentedControl for Theme and Language; iOS switches
  for the toggles; checkmark selection for the save location.
- New reusable building blocks: SettingsGroup, SettingsRow, ToggleRow,
  IconTile, SegmentedRow, Chevron. Preserves every backing setting.
- Adds an About/Licenses group with Star, Privacy Policy, Version rows.

Add a "Background" toggle at the bottom (Personalization) that removes the
wallpaper PNG: new AppSettingsManager.get/setShowWallpaper, state hoisted in
DocsApp and threaded through DocsNavGraph. When off, the app falls back to a
flat iOS system-grouped background so glass surfaces still have a base to
sample. Strings added in en/pt/pt-rBR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pull selected pages into a new PDF. Reuses the existing
PdfSplitterImpl.extractPages (lossless page import).

- ExtractPagesViewModel: 1-based range parser ("1-3, 5, 8-10" -> sorted,
  unique, clamped 0-based indices); saves via SaveLocationManager (custom
  folder or Downloads) + RecentFilesManager.
- ExtractPagesScreen: built on ToolScaffold with a numeric range field,
  page-count indicator, apply, and open-output.
- Wiring: nav route, Tools grid card (ContentCut), en/pt/pt-rBR strings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Stamp a page number into the bottom margin of every page, reusing the
PDFBox HELVETICA text-stamp path from the watermark tool.

- pdf-core/pagenumber/PdfPageNumberer: bottom-center or bottom-right, with
  an optional "3 / 12" total and a configurable start number; font scales
  to the page short edge; source URI untouched.
- PageNumbersViewModel + PageNumbersScreen (ToolScaffold): position selector,
  show-total toggle; saves via SaveLocationManager + RecentFilesManager.
- Wiring: nav route, Tools grid card (Numbers icon), en/pt/pt-rBR strings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bake interactive AcroForm fields into static page content so a form can no
longer be edited (values become permanent). Self-contained via PDFBox
PDAcroForm.flatten().

- pdf-core/flatten/PdfFlattener: returns the number of fields flattened;
  writes a static copy even when the PDF has no form.
- FlattenPdfViewModel + FlattenPdfScreen (ToolScaffold); saves via
  SaveLocationManager + RecentFilesManager.
- Wiring: nav route, Tools grid card (Layers icon), en/pt/pt-rBR strings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On-device image processing, closing the last easy Pdf_Tools gap in this pass.

- pdf-core/image/ImageProcessor: inspect (dimensions + size), process (memory-
  bounded inSampleSize decode -> scale by percent -> re-encode JPG/PNG/WebP at
  quality), and saveToGallery (MediaStore Pictures/ClearPDF). Re-encoding a
  decoded Bitmap strips EXIF/GPS by construction; JPEG flattens alpha onto white.
  Reuses PdfRasterizer.ImageFormat.
- ImageToolsViewModel + ImageToolsScreen (ToolScaffold): 3-way format selector,
  quality slider (lossy only), resize slider, before/after size, Save + Share.
- Wiring: nav route, Tools grid card (PhotoSizeSelectLarge), en/pt/pt-rBR strings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Render pasted HTML or a loaded .html file to a paginated PDF fully on-device.
The app holds no INTERNET permission, so JavaScript is disabled and the base
URL is null - only self-contained HTML/CSS renders.

- util/HtmlToPdfConverter: offscreen WebView lays out HTML at A4 width, then
  each page-height slice is drawn onto an android.graphics.pdf.PdfDocument page
  (main-thread, async via onPageFinished; 500-page safety cap).
- HtmlToPdfViewModel: runs the WebView convert on Dispatchers.Main via
  suspendCancellableCoroutine; loads .html file text; saves via SaveLocationManager.
- HtmlToPdfScreen (ToolScaffold): HTML text field, load-file button, convert,
  open-output.
- Wiring: nav route, Tools grid card (Code icon), en/pt/pt-rBR strings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Complete interactive PDF form fields on-device, then optionally flatten.

- pdf-core/form/PdfFormService: readFields() enumerates AcroForm terminal
  fields (text / checkbox / choice, recursing containers); fill(values,
  flatten) writes them back via PDField.setValue / check / unCheck and can
  bake them permanent. Source URI untouched.
- FillFormViewModel: editable field list; saves via SaveLocationManager +
  RecentFilesManager.
- FillFormScreen (ToolScaffold): dynamic typed inputs (text field per
  text/choice field, switch per checkbox) + a flatten-on-save toggle.
- Wiring: nav route, Tools grid card (EditNote), en/pt/pt-rBR strings.

With Flatten, Image Tools, HTML->PDF and this, every feature on the
Pdf_Tools list is now covered (17 tools).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Web to PDF (was HTML to PDF): add a Web-URL mode alongside pasted HTML.
- Add INTERNET/ACCESS_NETWORK_STATE permissions, used only by this tool to
  fetch a user-entered URL.
- HtmlToPdfConverter.convertUrl loads the URL with JavaScript enabled and a
  longer settle before snapshotting; convertHtml stays JS-off/offline.
- ViewModel gains a URL/HTML mode + scheme defaulting (example.com -> https://).
- Screen: Web URL / HTML segmented control with a URL field.

Search highlight: the box used the full line height (with leading) so it
towered over the glyphs. Trim it vertically to hug the text, shrink the
corner radius, drop the heavy glow, and change orange -> a calm blue
(secondary #60A5FA@0.22, active #3B82F6 fill+thin outline).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an image watermark alongside the existing text watermark, matching the
"text or image watermarks" feature.

- PdfWatermarker.applyImage: stamps a bitmap (logo) centered on every page via
  LosslessFactory + drawImage under an alpha graphics-state; optional 45%
  diagonal rotation about the page centre.
- Watermark VM gains a TEXT/IMAGE mode + image picker; decodes the picked
  bitmap on IO before stamping.
- Watermark screen: Text/Image segmented toggle with a pick-image button.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rework the Settings screen per the design spec - not a restyle but a
rethought hierarchy on genuine backdrop-blurred glass.

- Section groups are now real Liquid Glass: an outer Box.liquidGlassPanel
  (blur + backdrop sampling + soft shadow) with an inner clipped Column so the
  wallpaper reads through; no more solid slabs.
- Reordered: Appearance, Language, Storage, File Processing, Personalization,
  About (GitHub + Privacy only), Open Source, then a centered version footer
  (version is no longer a big row).
- Compact native rows (icon tile / title+description / right control), inset
  hairline separators. Storage shows the path as a subtitle with a checkmark or
  chevron. Compression quality gains "smaller size <-> higher quality" labels.
- More compact, animated glass segmented controls for Appearance/Language.
- Remove Notifications entirely: the toggle, its state, AppSettingsManager
  get/setNotifications + KEY, and the strings in all locales.
- Bottom nav: the selected capsule is now a bright frosted-glass highlight
  (white sheen + accent whisper) instead of a dark pasted-on pill.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Search highlight: trim harder to hug glyphs (vertical inset 0.16 -> 0.24),
  drop the outer halo, keep a snug blue fill + thin outline. It was still
  towering over large title text.
- Privacy/offline release: hide the Web/HTML-to-PDF tool (comment out its
  Tools-grid card; keep the route, screen, VM and converter code) and remove
  the INTERNET / ACCESS_NETWORK_STATE permissions from the manifest. Re-enable
  by uncommenting both.
- Restore the Settings screen from the main branch (its card-based design) and
  re-wire it to the current feature set: add Language and Background sections,
  update the signature, and remove Notifications (its backing prefs were already
  deleted). Added the Pdf_Tools attribution.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1. Search highlight: trim the line box ASYMMETRICALLY (less off the top, more
   off the bottom) so the tag sits on the word (caps to baseline) instead of
   centering in the box - it had shrunk into a thin band through the middle.
2. Settings Appearance + Language: rebuilt as LiquidButton refracted-glass
   segmented buttons (were flat boxes) and localized via string resources.
3. Language change now actually applies: DocsApp persists the locale then
   recreates the Activity so attachBaseContext rebuilds resources in the new
   locale (the Compose-only path never switched strings). Added findActivity().
4. Audited every setting is wired to persistence (theme, language, save
   location, auto-compress, keep original, quality, background).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1. Star-on-GitHub prompt: it is a Dialog (separate window) so liquidGlassPanel
   showed the raw wallpaper PNG. Use a solid themed card instead.
2. Settings screen fully localized (all remaining hardcoded English -> string
   resources), so Portuguese now applies inside Settings too. Added
   settings_change_folder / settings_reset.
3. No-wallpaper background greyed (#E9E9EE / #1C1C1E) instead of pure
   white/black, so the liquid-glass panels stay visible (Apple HIG).
4. PDF viewer: long-press the Open-another-PDF circle morphs it into a Share
   button (icon crossfade + surface eases to green, haptic, auto-revert); tap
   then shares the current document. Added optional onLongClick to
   LiquidIconButton (combinedClickable).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tons

1. Search highlight: extend the band up and down (insets 0.12/0.20 -> 0.06/0.13)
   so it fits the glyphs; still asymmetric to sit on caps-to-baseline.
2. Viewer share-morph button: Apple blue (#0A84FF) instead of green; keeps the
   IosShare Apple glyph.
3. Recents long-press menu redesigned WhatsApp-style: a clean vertical action
   list (Open / Share / Details / Remove) under the filename header, instead of
   a row of large colored circle buttons.
4. Settings Appearance/Language segmented buttons: drop the opaque white surface
   (0.55 -> 0.16) so the liquid-glass refraction shows in light mode instead of
   a flat grey fill (matches the PDF-viewer chrome buttons).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…are, reaction pill

1. Settings Appearance/Language selectors now match the insert-text dialog
   buttons: unselected uses a subtle dark field surface (Black@0.06 light /
   White@0.10 dark) so the glass refracts; selected uses a color tint. The
   opaque white surface was what looked flat grey.
2. Editor Tools panel no longer auto-hides while open: PdfViewerScreen tracks
   editorToolsOpen via a callback from the toolbar and the auto-hide waits for
   it to be closed, so browsing tools keeps the chrome up.
3. Share: the Open-another circle now presses-and-holds into a vertical glass
   capsule; swipe up and release to share the document (ShareMorphButton,
   detectDragGesturesAfterLongPress). Apple blue + IosShare glyph.
4. Recents long-press menu is now a WhatsApp-style reaction pill: a compact
   horizontal capsule of round tinted glass buttons, not a vertical list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… expand

1. Recents reaction pill now floats ABOVE the pressed row (captures the row top
   + height and positions above, flipping below only if there is no room),
   instead of overlapping the row.
2. Share morph: share glyph on top (always visible), the swipe-up arrow below
   it (brightens as you drag).
3. Editor Tools bar no longer moves when expanding: the sub-toolbar and
   tool-selector reveal switched from slide to expandVertically(from Bottom), so
   the panel unfolds upward from the pinned pill and the pill stays put.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1. Recent rows no longer grey out when held: dropped the combinedClickable
   default ripple (indication = null) and added a springy press-scale via the
   interaction source, so a held row eases down and springs back like an Apple
   liquid-glass button.
2. Info dialog: removed the default ripple on the full-screen scrim (that was
   the grey flash when tapping outside) and on the inner card, and softened the
   dim from 0.45 to 0.28.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…open

1. Share cylinder morph no longer pushes the Editor Tools pill: the button keeps
   a fixed 52dp layout footprint and the capsule overflows upward (requiredHeight
   inside a fixed Box), so the toolbar row height never changes.
2. Settings: File Handling and Auto-Compress no longer share the same icon
   (Description and Compress).
3. Custom wallpaper: Personalization now has a Gallery picker + Reset button when
   the background is on; DocsApp decodes and renders the chosen image (persisted).
4. Info dialog scrim softened further (0.28 -> 0.14) so the screen stays in focus.
5. Opening a PDF from recents uses a smooth fade + zoom ("document opens")
   transition instead of the horizontal slide that stuttered.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Editor Tools reveal now uses spring physics (expandVertically with a spring,
  not a linear tween) for a liquid Apple feel.
- Share capsule morph grows strictly UPWARD (bottom-aligned) with a springy
  overshoot (52 -> 108dp), instead of expanding both directions.
- When the capsule morphs up, the tool panels compress a touch (top-anchored
  scaleY, so their bottom recedes up and the top does not move) to give the
  cylinder room without shifting up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Chrome layering: new GlassScreenScaffold composes content into a captured
layer first and the header last as an overlapping sibling, so cards scroll
under the chrome and its glass refracts them. Rolled out to ToolScaffold
(8 screens), the 12 title-pill screens, Home, Tools and the XLSX viewer.
PdfViewerScreen already had this shape and is unchanged.

Search: one 36dp / 13sp SemiBold capsule everywhere via the new public
GlassSearchPill. PdfSearchBar drops the full-width slab; nav circles move
outside the pill and the match count moves inside it.

Recents: RecentFile.pinned (serialized with a default, no migration),
pinned-first sort, pinned entries exempt from the 20-item trim, a glass
capsule menu with Pin, a category filter glyph, swipe-to-delete, and a
sheets label instead of a pages label for spreadsheets.

Locale: the restart is kept but choreographed - fade out, recreate, fade
in, with the OS transition suppressed on both sides.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix1 - search bar had no life in it. GlassSearchHeader drove its whole
open/close from two critically-damped floats, and one of them owned the
leading slot's real width, so it had to stay damped. Split off a third
float that rides its own clock and only drives draw-time properties
(field scaleX/scaleY, title-pill shrink, the icon's quarter-turn), so it
can overshoot without dragging the layout width past 1. Opening bounces;
closing stays clean, since an overshoot on close drives the scale under
its floor and reads as a glitch. Alpha deliberately stays critically
damped - it clips at 1.0 and would flicker.

Also hardened the width float itself: moved to damping 1 and clamped
with coerceAtLeast(0), because a negative width throws - the same crash
class this project already hit once by feeding a springy value into
Modifier.padding.

fix2 - the viewer chrome was three different materials. The top-bar trio
(back circle, page pill, search circle) runs blur 2 / lens 12x24, while
everything larger ran liquidGlassPanel at blur 8 / lens 20x40 with a
gravity highlight and an inner shadow, and the find bar sat in a third
tier with 30dp circles against the reference 40dp. New ViewerGlass.kt
lifts the button recipe off its hardcoded circle so panels can wear it;
LiquidButton and friends are read-only, hence the copy. Highlight and
shadow are omitted rather than nulled, so they pick up drawBackdrop's
non-null defaults and match the reference exactly.

Converted: the five bottom-toolbar panels, the spreadsheet cell popup and
sheet picker, the PDF viewer's empty-state and password panels, the image
editor's controls panel, and ShareMorphButton - the worst offender, a
heavy panel rendered as a 52dp circle a few dp from the 40dp reference
circles. It also moves to a Capsule, so its 52-104dp morph is an actual
circle-to-capsule, which its own doc comment already claimed.

Dialogs keep the heavier stack - they sit over a scrim and need an edge
of their own. Every deliberate colour is preserved; only the recipe
changed. The ~25 coloured tool buttons needed no edit at all, since they
were already on the reference recipe.

Dropped two now-dead params: PdfSearchBar.field (the nav circles moved to
the chrome tint) and ShareMorphButton.uiSensor (no highlight means no
gravity angle to feed).

Not device-verified yet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nappier recents

Animation/UI polish batch:
- Nav: 'document lifts open' transition for PDF/spreadsheet/image viewers; hold the screen behind static+opaque during open/close so edges never flash the bare window (no more flicker on open from recents or on back).
- Sign screen: follows app light/dark theme (chrome flips ink; signing paper stays light in both); springy colour beads; visible saved-signature borders.
- Recents: swipe-to-delete collapse uses a short tail-free tween to cut the glass-panel re-blur lag; pinned indicator contained in a tinted chip.
- Viewer toolbar: sequenced fade-out/fade-in hand-off between the editor-tools pills and the draw/select sub-toolbar.
- Bundles prior uncommitted work (onboarding, viewer, converters, strings).
@gitguardian

gitguardian Bot commented Aug 21, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
35942260 Triggered Generic Password 3cca835 app/src/main/java/com/chethan616/clearpdf/ui/viewmodel/PdfViewerViewModel.kt View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Chethan616 and others added 3 commits August 21, 2026 16:48
Tapping a recent no longer flashes the viewer's "Open a PDF" picker before
the pages arrive. When the viewer is handed a URI (recents, external open, or
a tool's output) it shows an opaque dark curtain with a centered spinner
instead, and the identical curtain is held over the freshly-loaded viewer
until page 1 has actually rendered, then fades out to reveal the PDF.

Because both the no-document branch and the loaded-viewer overlay paint the
same fill and spinner, the branch swap when the document arrives is seamless;
only when the first bitmap is ready does the curtain dissolve. Reads as
"wait a beat, then the PDF fades in" instead of a hard cut to an empty page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reworks the recents delete so it reads as one fluid motion instead of the
old stutter, and gives the pinned marker a cleaner glyph.

Delete:
- The container now owns the gap-close. A single animateContentSize spring
  (lightly underdamped) on the recents glass panel makes the whole panel
  minimise with an elastic settle when a row leaves, replacing the per-row
  height collapse whose long re-blur tail was the visible lag.
- The row exit is now a single clean fade of the card and its red slab as
  one object (no more three-phase hold -> fade -> collapse), so the red can
  never outlive the card it belongs to.
- On a swipe commit the card keeps its momentum and slides off while it
  dissolves, so the gesture never stalls into a "stop, then fade" hitch.
- The delete slab eases in with the drag instead of snapping fully opaque on
  the first pixel of travel (the "red glitch" pop), and fades back out on a
  released half-swipe.
- The long-press menu's Remove now plays the exact same exit as a swipe via
  a shared pendingDelete path, instead of snapping the row out of existence.

Pin badge:
- Replaces the leaning pushpin with a shield-with-check drawable ("kept"),
  which is more legible at badge size and needs no rotation to look
  intentional.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…crash fix

Bump to versionName 1.2.0 (versionCode 3).

Text selection (premium rework)
- Drag to select MANY words at once: in Select Text mode the page doesn't
  scroll, so a drag now sweeps a real reading-order text selection (word →
  sentence → paragraph) live under the finger, instead of one word per tap.
  Tap = word, double-tap = line, long-press = paragraph still work.
- The selection pill gains a Delete action when the selected text is already
  highlighted — tapping a highlight again now offers to remove it (previously
  only Copy/Highlight showed). Highlight becomes Recolor in that state.

Opening a document
- Removed the morph loading indicator entirely; opening a PDF is now a clean
  dark fill that dissolves to the first page (no picker flash, no spinner).
- Decrypting a password PDF plays a blue liquid-glass "scan" animation in the
  onboarding page-5 self-drawing style (state.decrypting).

Crash fix — large / encrypted PDFs on scroll
- PdfViewer.renderPage now catches Throwable (a big page can throw
  OutOfMemoryError from Bitmap.createBitmap — an Error, not an Exception — which
  the old catch let escape and crash the app), recycles partial bitmaps, and
  guards openPage.
- The viewer's render coroutine wraps the render in runCatching.
- Text extraction is serialized behind a Mutex so the eager first-pages pass and
  fast scrolling can't stack multiple full-document PdfBox parses in RAM.

Onboarding
- Page 1 (book): shadow disabled for that page (it used to snap in when the book
  finished), and the book's lines now take the colours of the sheets that formed
  it, in sequence, instead of collapsing to red. Adds viewerGlass(withShadow).
- Page 4: replaced the generic file-kind list with one liquid-glass document
  card that morphs through PDF → Word → Excel → PPT → Image, re-tinting as it goes.

Home
- Container drop-shadows now fade IN with their panels instead of snapping in at
  the end of the entrance (CompositingStrategy.ModulateAlpha avoids the offscreen
  buffer that was clipping the out-of-bounds shadow until alpha hit 1).

Editor toolbar
- The tool pills now bounce with the share capsule's own spring when the share
  button opens, instead of deflating limply beside it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Chethan616 Chethan616 changed the title Fluid document-lift navigation, theme-aware sign screen, snappier recents ClearPDF v1.2.0 — text selection, decrypt animation, onboarding polish, crash fix Aug 21, 2026
@Chethan616
Chethan616 merged commit 918fa76 into main Aug 21, 2026
1 of 2 checks passed
Sign up for free to 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.

1 participant