Open / Save Document
Keyboard: F6 to jump to this button; Enter or Space to activate
Clicking this button opens the File Manager system, which provides dialogs for opening and saving Patent Lightning note files (.ptl format). The File Manager handles all file operations including opening from your computer or cloud storage, saving to either location, and managing recent files.
→ See Section 3: File Management System for complete details on every open/save operation.
Claim Chart Templates
Keyboard: Enter or Space to activate
Clicking this button opens a popout panel positioned to the right of the sidebar. The popout has two parts:
Open Chart Library Button: At the top of the popout, a prominent blue button labeled "Open Chart Library" opens the unified library dialog filtered to show saved claim chart files. This lets you browse, open, and manage previously saved charts.
New Chart from Template: Below the library button, a scrollable list displays 25 claim chart templates organized into 9 categories. Each template entry shows its name and a brief description. The categories are:
- Invalidity: Invalidity/Obviousness (§103), Anticipation (§102), Prior Art Chart
- Construction: Claim Construction in 3-col (Pre-Markman), 4-col (Post-Markman), and 5-col (Full Analysis) formats
- Infringement: Element-by-Element, Literal Infringement (Direct Comparison), Doctrine of Equivalents in 6-col (Function/Way/Result) and 4-col (Differences) formats
- Post-Grant: IPR Petition (Inter Partes Review), PGR Chart (Post-Grant Review)
- ITC & Licensing: ITC Complaint (§337), License Comparison (Terms Analysis)
- Portfolio: Prosecution History (File Wrapper), Patent Portfolio (Asset Overview), Patent Family (Related Patents)
- Damages: Damages Analysis (Lost Profits/Royalty), Royalty Analysis (Georgia-Pacific)
- Trade Secret: Trade Secret Misappropriation
- General: Simple 3-column, Simple 4-column, Side-by-Side Comparison
Clicking any template opens the Claim Chart Generator (claimchart.html) in a new browser tab with that template pre-loaded via the ?template=
Popout behavior: The popout appears fixed at left: 60px from the viewport edge. It has a maximum height of 80% of the viewport with internal scrolling. Clicking anywhere outside the popout or the button closes it. Hovering over template items highlights them with a light background.
Page Indicator
Keyboard: Enter or Space to open Go-To-Page dialog
The page indicator displays the current page number in the format "3/24" (current page / total pages). It updates automatically as you scroll through the document, calculated by detecting which page occupies the center of the viewport.
How the current page is determined: The app calculates the center point of the visible viewport area, converts that to document coordinates (accounting for zoom level), and then checks which page container that center point falls within. In vertical layout mode, this is based on the vertical (Y) position; in horizontal mode, it's based on the horizontal (X) position.
Go-To-Page Dialog
Clicking the page indicator (or pressing Ctrl+G from anywhere) opens a floating dialog positioned to the right of the indicator. The dialog contains:
Page number input: A numeric input field pre-filled with the current page number. Type a page number and press Enter or click "Go" to navigate. The input validates that the number is between 1 and the total page count. Invalid entries show a red error message below the input ("Enter number between 1-N") that auto-clears after 3 seconds.
Bookmark current page button: Below the input, a button lets you bookmark or un-bookmark the current page. The button text and styling change based on the current bookmark state: blue background with "Bookmark Page X" when not bookmarked, or red-tinted background with "Remove Bookmark from Page X" when bookmarked. Clicking this button toggles the bookmark and updates the visual state of the bookmark icon on the page itself.
Bookmarked Pages list: Below the bookmark button, a labeled section shows all bookmarked pages. Each bookmark entry is a row with three interactive elements:
- Title button: Shows "Page X" or "Page X - Description" — click to navigate to that page and close the dialog
- Edit button (pencil icon): Click to enter inline editing mode where the bookmark description text becomes an editable input field. Press Enter to save, Escape to cancel. On blur (clicking elsewhere), the edit is saved automatically.
- Delete button (trash icon): Click to remove the bookmark.
The bookmark list supports full keyboard navigation: Arrow Up/Down moves between rows, Arrow Left/Right moves between the three controls within a row, Home/End jump to first/last control (Ctrl+Home/Ctrl+End for first/last row), and Escape closes the dialog.
Auto-bookmarked claim pages: When a patent document loads, pages containing patent claims are automatically bookmarked with descriptions like "Claim 1" or "Claims 1 - 20" based on the claim numbers detected in the word data.
Dialog behavior: The dialog has a focus trap — Tab wraps within dialog elements. Pressing Escape closes the dialog and returns focus to the page indicator. Clicking outside the dialog also closes it. Navigation to a page uses smooth scrolling.
AI Assistant
Keyboard: Enter or Space to activate
This button currently shows a "Coming Soon" popup when clicked. The popup is a small white floating panel positioned to the right of the button containing a clock icon, the title "AI Tools," and the message "Coming in next release..." Clicking outside the popup or clicking the button again closes it.
Search Document
Keyboard: Enter or Space to open the Search Panel
Clicking this button opens the Search Panel — a floating, draggable, resizable panel for searching through the patent document's text. If a search panel is already open, it is removed and a fresh one is created. After opening, the search panel is brought to the front of the stacking order (above the annotation document and help window).
→ See Section 4: Search System for complete details on search functionality.
Highlight / Markup Tool
Keyboard: Enter or Space for keyboard menu
This button activates the highlight/markup tool for creating colored text annotations in the document.
Mouse click behavior: Clicking the button opens the Highlight Palette — a floating color/mode picker that lets you choose a highlight category and markup mode (highlight or underline). If screenshot mode is currently active, clicking the pencil button exits screenshot mode instead.
Keyboard activation (Enter/Space): When activated via keyboard, instead of immediately showing the palette, a three-option menu appears:
- "Color Picker" — Opens the highlight palette for color/mode selection
- "Select Text" — Enters Keyboard Text Selection Mode for creating highlights using only the keyboard
- "Navigate Selections" — Enters Selection Navigation Mode for reviewing and editing existing highlights
Pencil icon appearance: The pencil icon in the sidebar dynamically updates to reflect the currently active color and markup mode. The icon's colored fill area changes to match the active category color, and the icon shape changes between a highlight pencil (paint fill) and an underline pencil (diagonal stroke) based on the active mode.
→ See Section 5: Highlight & Markup System for the color picker, markup modes, and selection operations.
→ See Section 6: Annotation System for annotation popups and the annotation document.
Annotation Document
Keyboard: Enter or Space to open
Clicking this button toggles the Annotation Document panel — the master control surface for all annotations in the document. If the panel is not currently visible, it opens and is brought to the front of the stacking order. If it's already visible and in front, clicking brings it to front if it was behind other panels.
Keyboard behavior: When activated via Enter, after the panel opens, focus moves into the annotation document panel itself (to the first interactive button within it) after a 150ms delay, allowing keyboard users to immediately interact with the panel's controls.
→ See Section 6: Annotation System for complete details.
Screenshot Tool
Keyboard: Enter or Space for keyboard activation
Mouse click: Toggles screenshot mode on/off. When screenshot mode is active, the cursor changes to a crosshair and you can click-and-drag to draw rectangular screenshot frames on the document.
Keyboard activation (Enter/Space): The keyboard behavior depends on whether screenshot frames already exist:
- No existing frames: Immediately creates a new frame at the center of the viewport.
- Existing frames: Shows a two-option menu: "New" (create a frame at viewport center) or "Edit Existing" (enter frame navigation mode where Tab/Shift+Tab cycles between existing frames).
→ See Section 7: Screenshot Frames for complete details.
Print to PDF
## Print Dialog
Clicking the printer icon in the sidebar (or pressing Ctrl+P / Cmd+P, which is intercepted by the app) opens a floating Print Dialog panel. The dialog appears in the upper-right corner of the screen and is draggable by its blue header bar.
Dialog contents:
Document info: Shows the document name (nickname if set, otherwise the patent number) and total page count.
Page range selection — three radio button options:
- All pages (default): Prints every page in the document (1 through total)
- Current page only: Prints just the page currently visible in the viewport
- Custom: Enables a text input where you type a page range using the format "1-5, 8, 12-15" — supports comma-separated individual pages and dash-separated ranges. Invalid entries show an alert.
Margin note font size: When margin notes are enabled, a dropdown lets you select the font size for margin note boxes (6px through 14px, default 8px).
Quality — a dropdown with three options:
- High (300 dpi, lossless): Full native resolution. Largest file size but sharpest output.
- Standard (225 dpi) (default): 75% of native resolution. Good balance of quality and file size.
- Draft (150 dpi): 50% of native resolution. Fastest to generate and smallest file.
Action buttons:
- Cancel: Closes the dialog and removes any margin note boxes
- Generate PDF: Starts the PDF generation process
Keyboard: Escape closes the dialog. Focus is placed on the Generate PDF button after the dialog opens.
## PDF Generation Process
When you click Generate PDF, the app:
- Shows a progress overlay with a progress bar, percentage, and status text ("Rendering page X of Y...")
- Determines which pages to include (based on page range selection)
- Renders each page to an off-screen canvas, compositing the page image with annotation overlays
What gets rendered on each page:
- The patent page image (with any rotation applied)
- Highlight rectangles in category colors at 25% opacity
- Underline strokes in category colors (2px thickness)
- Screenshot frames with dashed borders (8px dash, 4px gap, 3px line width)
- Margin note boxes (if enabled) at the positions you arranged
- Page number footer ("Page X of Y") centered at the bottom
PDF characteristics:
- Each page can have different dimensions and orientation (landscape pages detected automatically)
- Base page size scaled from A4 dimensions with correct aspect ratio
- Output filename defaults to
_annotated.pdf
Cancel during generation: The progress overlay includes a cancel button. Setting _cancelled to true causes the render loop to exit early.
## What Gets Included
The print output includes only annotations whose categories are currently visible (based on the page visibility filters). Hidden categories are excluded. Search result highlights are not included — only user-created highlights and underlines.
Page Orientation / Rotate
Keyboard: Enter/Space on the button, or Alt+O or Alt+R from anywhere
Rotates the currently visible page by 90 degrees clockwise. Each click rotates an additional 90°, cycling through 0° → 90° → 0°. This is useful for patent drawings that are oriented in landscape within a portrait document.
How rotation works:
- The rotation button icon on each page changes to show the appropriate rotation direction based on the current state.
- Word coordinate data is also transformed so that highlights, selections, and search results align correctly with the rotated text.
- Screenshot frames on a rotated page are repositioned proportionally to maintain their relative position on the page content.
- Open annotation popups are temporarily preserved and restored after rotation.
Toggle Page Layout
Keyboard: Enter or Space to toggle
Switches the document layout between two modes:
- Vertical (default): Pages are stacked top-to-bottom in a single column. Scroll down to move through pages.
- Horizontal: Pages are arranged left-to-right in a single row. Scroll right to move through pages.
The button icon changes to show the current mode: when in vertical mode, the icon shows two pages stacked vertically; when in horizontal mode, it shows two pages side by side.
What happens when toggling: The app calculates which page you're currently viewing and your relative position within that page, performs the layout switch (re-initializing the coordinate system and spatial index), re-renders all pages, and then scrolls to restore your approximate viewing position on the same page.
Toggle Line Numbers
Keyboard: Enter or Space to toggle
Shows or hides line numbers in the left margin of each page. Line numbers correspond to the line numbering used in patent documents.
Default state: Line numbers are hidden by default. The setting is loaded from local storage on initialization — if no saved preference exists, line numbers remain hidden.
Help Button
Keyboard: Enter or Space to open
Opens a floating, draggable, resizable help window. The help window is implemented as a
- Title bar: Shows "Help Center" with the Patent Lightning bolt icon and a close button (X). The title bar serves as a drag handle for repositioning the window.
- Content area: An iframe loading patent-viewer-help.html which contains the help documentation.
- Resize handle: A corner handle in the bottom-right for resizing the window by dragging.
Reading Mode
Keyboard: Enter or Space to open the menu
Clicking (or pressing Enter) opens a popout menu with reading mode options. The menu appears to the right of the button and offers:
Start Reading: Begins line-by-line reading mode from the line closest to the center of the current viewport.
Reader Type: A toggle between two modes:
- "Built-in Browser Reader" — Uses the Web Speech Synthesis API built into modern browsers. When active, ALL focusable UI elements in the app announce themselves on focus (button names, roles, states, etc.), and the reading mode button gets a blue highlight to indicate the browser reader is globally active.
TTS Settings (browser reader only): When using the built-in browser reader, additional settings become available:
- Rate: Speech speed (default 1.0)
- Pitch: Voice pitch (default 1.0)
- Volume: Speech volume (default 1.0)
- Language/Voice: Language selection (default en-US) with available system voices
Button highlight: When the built-in browser reader is active OR when reading mode is active, the reading mode button gets a visual highlight (semi-transparent blue background with an inset blue border).
→ See Section 9: Reading Mode & Text-to-Speech for complete navigation details.
Accessibility / Color Assist Mode
Keyboard: Enter or Space to toggle
Toggles Color Assist Mode, designed for users with color vision deficiency. When enabled:
- Each of the 6 highlight categories receives a distinct visual pattern (stripes, dots, crosshatch, etc.) in addition to its color, making categories distinguishable without relying on color alone.
- Category number indicators appear in the margin alongside highlighted text.
- The pulsing animation for the current search result uses opacity changes instead of color changes.
Account
Keyboard: Enter or Space to open; Tab wraps to first sidebar button
Opens the account popup managed by cross-tab sync system. The popup shows current user information and a sign-out button.
Special Tab behavior: This is the last button in the sidebar. Pressing Tab (without Shift) wraps focus to the first sidebar button (Open/Save), creating a circular Tab loop through all sidebar buttons.
→ See Section 12: Session & Account Management for complete details.
Zoom Controls
Interaction: Ctrl+scroll wheel (desktop) or pinch gesture (trackpad/touch) to zoom in/out.
Range: 10% minimum (0.1x) to 500% maximum (5x), with 100% (1x) as the default.
What scales with zoom: All visual elements scale proportionally: page images, selection highlights, screenshot frames, line numbers, popup positions, annotation indicators, bookmarks, and category filter buttons. The zoom level is applied as a multiplier to all coordinate calculations.
Scrolling & Page Navigation
Standard scrolling: Mouse wheel, trackpad gestures, or scrollbar dragging all work normally in the viewer area.
Programmatic navigation:
- Ctrl+G or clicking the page indicator → Go-To-Page dialog
- goToPage(n): Smooth-scrolls to place the target page near the top-left of the viewport with a 20-unit margin
- Search result navigation auto-scrolls to each result
- Reading mode auto-scrolls to keep the current line visible
Page indicator updates: As you scroll, the page indicator continuously updates to show which page is at the center of the viewport. This is computed on scroll events by finding which page's bounds contain the viewport center point.
Page Bookmarks
Visual indicator: Each page has a bookmark icon in the upper-right corner — a ribbon/flag shape. Bookmarked pages show the icon in an "active" style; non-bookmarked pages show it in an "inactive" (faded) style. The page number is displayed inside the bookmark icon.
Creating bookmarks: Click the bookmark icon on any page to toggle its bookmark state. Bookmarks can also be toggled from the Go-To-Page dialog.
Auto-bookmarked claim pages: On document load, the app scans each page's word data for claim numbers. Pages containing claims are automatically bookmarked with descriptions like "Claim 1" or "Claims 3 - 7". This auto-bookmark only sets the description if the page doesn't already have a user-provided description.
Bookmark descriptions: Each bookmark can have a user-assigned description. Edit descriptions via the Go-To-Page dialog's edit button. The description appears alongside the page number in the bookmark list.
Page Visibility Filters
Location: Six small colored circle buttons appear at the top of each page, positioned between the rotation button and the bookmark icon.
Purpose: These filters control which highlight categories are visible on the document pages. Each button corresponds to one of the six highlight categories:
Behavior: Each button is a checkbox-style toggle. When a category is active (checked), its circle shows full color opacity with a white checkmark and a blue border. When inactive (unchecked), the circle is semi-transparent with the checkmark in the category color and no border.
Toggling a filter immediately shows/hides all selections of that category across the entire document. The selection renderer re-draws with the updated visibility set.
Synchronization across pages: Because these filter buttons are rendered per-page, toggling one button updates all corresponding buttons on all other pages to stay in sync (matching the same checked/unchecked visual state).
Annotation Document sync: When the "Sync Filters to Pages" option is enabled in the Annotation Document (Section 6.1.1), these page-level filters are bidirectionally linked with the Annotation Document's color filters.
Open from Computer
Supported file type: .ptl — Patent Lightning note snapshot files.
What happens on open:
- The file picker dialog is shown, filtered to .ptl files.
- The selected file is read and parsed as a PTL snapshot (HTML with embedded JSON state data).
- A file handle is stored so that future quick-save operations can write back to the same file location without prompting.
- A local file store local storage record is created or updated for the opened file, storing the filename, patent number, serialized state, and file handle reference.
- The snapshot state is applied to the viewer: selections, screenshot frames, annotation document state, search panel state, viewport position, bookmarks, page rotations, and all other saved state.
Open from Cloud
Opens a folder browser dialog showing the user's encrypted cloud storage folder structure. The user navigates the folder tree, selects a .ptl file, and the file is downloaded from cloud storage and decrypted using the encryption system.
Folder path tracking: The folder path from which the file was opened is stored so that "Save As" defaults to the same location.
Open Recent Files
The recent files system tracks recently opened files from both computer and cloud sources. Each entry records:
- File name
- Source (Computer or Cloud)
- Last opened timestamp
- For computer files: the local file store record ID (used to re-acquire the file handle)
- For cloud files: the cloud storage key and folder path
Clicking a recent entry re-opens that file. Computer files attempt to re-acquire their file handle via local file store. Cloud files download and decrypt from the remembered cloud storage key.
Quick Save
Behavior depends on the file's origin:
- Opened from Computer with file handle: Writes directly back to the same file (no dialog needed).
- Opened from Cloud: Encrypts and uploads back to the same cloud storage key.
- No previous save location: Falls through to the Save As dialog.
Save As to Cloud
Shows a folder browser dialog for selecting a destination folder in the user's cloud storage. Includes a file name input field that defaults to a name based on the patent number. The file is encrypted and uploaded to S3. The file tracker is updated with the new cloud location so future quick-saves go to this location.
Save to Computer
PTL File Format
Contents of a PTL snapshot:
- Annotation document state: Visibility, minimize/maximize state, color filters, sort mode, text filters, master display toggles, per-record visibility/lock maps, window position/size
- Page rotations: Per-page rotation angles
- Page bookmarks: Bookmark states with descriptions
- Page visibility filters: Which category filters are active
- Viewport: Scroll position, zoom level, layout orientation
- UI state: Sidebar open, line numbers visible, crop settings
- Active tool state: Active color, markup mode, screenshot mode, draw mode
- Open popup list: Which annotation popups are open, with their positions and states
Auto-Save
The auto-save system continuously protects your work through multiple triggers:
Triggers:
- 30-second interval: A setInterval timer fires every 30 seconds
- Tab hidden: When the browser tab goes to the background (visibilitychange event with hidden state)
- Page close/navigation: The beforeunload event fires a final save
All the state components listed in Section 3.10 are saved to local storage. Additionally, if a local file store record exists for the current file, the file manager syncs the complete state to that record.
Search Panel Overview
The search panel is a floating panel that appears when you click the Search button or press Enter on it. Key characteristics:
- Draggable: Drag by the title bar to reposition anywhere on screen
- Resizable: Drag edges or corners to resize
- Minimizable/Maximizable: Window state controls in the title bar
- Stacking order: Participates in the three-panel stacking system with the annotation document and help window. Clicking the search panel brings it to front.
Search Input & Execution
Multi-term search: Separate multiple search terms with semicolons. For example, entering "claim 1; method; apparatus" runs three independent searches and combines all results. Each term is searched separately and results are concatenated (then filtered for overlaps).
Execution methods:
- Press Enter (unless "Require Search Button" mode is enabled)
- Click the Search button
- Paste button: Pastes text from the clipboard and immediately executes a search with that text
- Drag-to-search: Select text in the document while in drag-search mode (see 4.5)
Require Search Button mode: An optional setting (saved to a cookie) where pressing Enter in the search input does NOT auto-execute the search — you must click the Search button or use the paste button. This prevents accidental searches while typing.
Stop button: During a long-running progressive search, a Stop button appears that aborts the search mid-execution. The searchAborted flag is set and checked between page processing steps.
Search Modes & Matching
Progressive search (default): Searches the document page-by-page with a visual progress indicator. This allows results to appear incrementally rather than blocking the UI until the entire document is searched.
Fuzzy matching: The search engine uses fuzzy string matching with a configurable threshold:
- Default threshold: 70% match confidence
- Saved to cookie: matchThreshold=
- Token normalization: Words are normalized before comparison to handle variations in casing, punctuation, and formatting.
Result Navigation
Prev/Next controls:
- Buttons: Previous and Next buttons in the search panel
- Keyboard shortcuts: Comma (,) or Alt+Comma for previous; Period (.) or Alt+Period for next
- Counter display: Shows "3/47" format (current result number / total results)
Visual feedback on navigation: The current result gets a distinctive "search-current" CSS styling and a blink animation when you navigate to it. The viewport auto-scrolls to center the current result (unless in drag-search mode, where scrolling is suppressed to avoid disrupting the user's drag position).
Claim count indicator: The search results include a count of how many results fall within claim sections of the patent, with a "jump to first claim result" feature.
Drag-to-Search Mode
Activation:
- Click the drag toggle button in the search panel
- Press Alt+S from anywhere in the document
- The search panel opens automatically if not already open
How it works: When drag-to-search mode is active, clicking and dragging across document text selects words as a search query instead of creating a highlight selection. The selected text is placed into the search input and the search executes immediately.
Shift+drag: Appends the selected text to the existing search query, joined with a semicolon. This lets you build multi-term searches incrementally.
Visual indicator: The drag toggle button is highlighted (blue background, white text) when active. The cursor changes to a distinctive cyan pencil icon. The aria-pressed state is set to "true".
Exiting drag-to-search: Click in the page margin (outside the text columns) while in drag-to-search mode to exit the mode. Alternatively, click the drag toggle button again.
Search History Overview
The Search History system records every search you perform on each patent and stores it securely in the cloud. Unlike the basic recent searches list it replaces, the Search History provides persistent cross-device storage, rich filtering and sorting, custom search libraries, and the ability to import search terms from other patents.
Key capabilities:
- Automatic recording: Every search you execute is recorded with its full query text, the patent it was run against, a timestamp, the search mode (Progressive or Exact), and the result count.
- Cloud persistence: History is encrypted and saved to your S3 storage for each patent. It survives across browser sessions, devices, and tab reloads.
- Unlimited entries: There is no cap on the number of search history entries per patent.
- Cross-patent access: You can import search terms from any other patent in your account into the current patent's history, enabling you to reuse search strategies across your portfolio.
- Custom libraries: Save curated sets of search terms as named libraries at the account level. Libraries can contain terms from multiple patents and can be loaded into any patent's search history.
Search History Popup
The Search History popup is a standalone floating window, separate from the search panel. It opens when you click the Recent button in the search panel.
Opening: Click the Recent button next to the search input field. The history popup always opens above the search panel in the window stacking order. If the popup is already open but hidden behind other windows, clicking Recent brings it to the front without closing it.
Window controls: The popup has the same window control buttons as the search panel:
- Minimize: Collapses the popup to its title bar only
- Maximize: Expands the popup to fill the entire screen. Click again to restore the previous size and position.
- Close (X): Hides the popup. Your history data is not affected.
Dragging and resizing: Drag the blue title bar to reposition. Resize by dragging any edge or the corner handle, identical to the search panel behavior.
Stacking order: The history popup participates in the application's four-panel stacking system alongside the search panel, annotation document, and help window. Clicking any popup brings it to front and pushes others behind. The stacking order is preserved across sessions.
Session persistence: The popup remembers its position, size, open/closed state, minimized/maximized state, and stacking order between sessions. When you reload the page or return later, both the search panel and the history popup restore to exactly how you left them.
Filtering & Sorting
The history popup includes a powerful filter system modeled after the annotation document filter panel. Filters operate on the in-memory history list and update in real time as you type.
Adding filters: Click the + Add Filter button to add a new filter row. Each row has a type dropdown, a value input, and a remove (X) button. Multiple filters can be active simultaneously and are applied in sequence (all must pass).
Filter types:
| Type | Behavior |
|---|---|
| Term must include ALL | Every token in the filter value must appear somewhere in the search term. Use this to find entries that contain multiple specific words. |
| Term must include ANY | At least one token must appear in the search term. Use this for broad filtering across alternatives. |
| Term must NOT include ANY | Entries where any token appears in the search term are excluded. Use this to remove noise. |
| Pat must include ALL | Every token must appear in the patent number. Useful for finding entries from a specific patent family (e.g., filtering by "US1164" to find all US11640000-series patents). |
| Pat must include ANY | At least one token must appear in the patent number. |
| Pat must NOT include ANY | Entries from patents matching any token are excluded. |
| Date/Time must include ANY | No date filtering (shows all entries). This is the default for date filters. |
| Date/Time Prior To | Only entries timestamped before the specified date/time are shown. The input becomes a date/time picker. |
| Date/Time After | Only entries timestamped after the specified date/time are shown. |
Token syntax: Filter values are split on whitespace into individual tokens. Special rules:
- Quoted strings: Text enclosed in double quotes is treated as a single token. For example,
"claim 1"matches the phrase "claim 1" as a unit, not "claim" and "1" separately. - Semicolons: A semicolon within the filter value acts the same as a space separator, creating additional tokens.
- Patent number normalization: Patent filter tokens are automatically normalized using the same rules as patent upload. Entering "11646472" will match "US11646472", and "RE45123" will match "USRE045123".
Sorting: Click any column header (Search Term, Patent, Date/Time) to sort the table by that column. Clicking the same header cycles through descending, ascending, and no sort. The currently active sort column displays a ▲ (ascending) or ▼ (descending) arrow indicator. The default sort is Date/Time descending (most recent first).
Toolbar Actions
The toolbar row below the filter area provides actions that operate on checked entries in the table.
Select All checkbox: Toggles all visible (filtered) entries on or off. Shows an indeterminate state when some but not all entries are checked.
Go button: Collects all checked search terms, joins them with semicolons, and inserts them into the search panel's input field. This is the primary way to reuse previous searches. Whether the search executes immediately or waits for you to click Search depends on the "Require Search Button" setting in the search panel. If no entries are checked, the button does nothing.
Delete button: Permanently removes all checked entries from the current patent's search history. This affects both the local cache and the cloud copy. Deleted entries cannot be recovered. A confirmation toast shows the number of entries deleted.
Save Library button: Opens a dialog to save the checked entries as a named custom search library. See the Custom Search Libraries section below for details.
Add Library button: Opens a dialog listing all your custom search libraries with a search box. See the Custom Search Libraries section below.
Add Patent button: Opens a dialog listing all patents in your account with a search box. See the Cross-Patent Search History section below.
Add Folder button: Opens a folder tree picker to import search history from all patents in a folder. See the Cross-Patent Search History section below.
Single-click on a row: Clicking anywhere on a row (except the checkbox) inserts that single row's search term into the search panel input, the same as clicking Go with one entry checked. This is a quick way to re-run a specific previous search.
Custom Search Libraries
Custom search libraries let you save curated sets of search terms for reuse across any patent in your account. Libraries are stored at the account level, not per-patent, so a library created while working on one patent is available when working on any other patent.
Saving a library:
- Check one or more entries in the search history table (use filters and Select All to narrow down the set)
- Click the Save Library button in the toolbar
- Enter a descriptive name in the dialog that appears (e.g., "Prior Art Claim 1 Terms", "Pharmaceutical Method Claims")
- Click OK. The library is encrypted and saved to your cloud storage.
Each library records the query text, the originating patent number, the timestamp, and the search mode for each entry. The library name and entry count are stored in a cleartext index for browsing; the actual search terms are encrypted.
Adding a library to the current patent:
- Click the Add Library button in the toolbar
- A dialog appears listing all your saved libraries with their names, entry counts, and creation dates
- Use the search box at the top to filter libraries by name
- Click a library to load it. Its entries are merged into the current patent's search history.
Duplicate handling: When merging library entries into the current history, any entry whose query text already exists in the current history is skipped. Deduplication is based on the query string alone, regardless of which patent the entry originally came from. This prevents the same search term from appearing multiple times.
Library scope: Libraries are account-wide and independent of any specific patent. A library can contain entries from multiple different patents. Deleting entries from a patent's search history does not affect libraries that were saved earlier. Libraries and per-patent histories are completely independent data stores.
Cross-Patent Search History
Two toolbar buttons let you import search history from other patents into the current patent's search history. This is useful when you have developed search strategies on one patent and want to apply them to related patents.
Add Patent:
- Click the Add Patent button in the toolbar
- A dialog appears listing all patents in your account (excluding the currently open patent), showing patent numbers in bold and titles alongside
- Use the search box to filter by full or partial patent number, or by title text. The filter understands patent number formats and normalizes your input (e.g., typing "11646472" will match "US11646472")
- Click a patent to import its search history into the current patent's history
Add Folder:
- Click the Add Folder button in the toolbar
- A folder tree picker appears, visually matching the folder tree in the Patent Library sidebar. It shows the Patent Library root, all your folders with proper indentation and expand/collapse chevrons, and the Archive folder at the bottom.
- Click the chevron (▶) next to a folder to expand or collapse its subfolders without selecting it
- Click a folder name to select it. The system then loads search history from every patent in that folder and merges all entries into the current patent's history.
Important behavior notes:
- Independence: Imported entries are deep copies. Deleting an entry from the current patent's history does not affect the original patent's history, and vice versa. Each patent's search history is an independent encrypted file.
- Deduplication: If the source patent contains search terms that already exist in the current patent's history, duplicates are skipped. Matching is based on the query string alone.
- Patent column: Imported entries retain their original patent number in the Patent column, so you can see where each search term originated. You can use the Pat filter to show or hide entries by origin patent.
- Encryption: The remote patent's history is decrypted in memory for merging, then the updated current patent history is re-encrypted and saved. No plaintext search terms are stored on disk or transmitted unencrypted.
History Persistence & Sync
Search history uses a dual-write persistence strategy to balance speed with cross-device reliability.
Where history is stored:
- IndexedDB (local): An immediate local copy is written every time an entry is added or deleted. This ensures the history popup loads instantly when you switch between patents, even before the cloud copy is fetched.
- S3 (cloud): An encrypted copy is written to your S3 user data bucket. Cloud writes are debounced by 2 seconds to avoid excessive network traffic during rapid searches. The S3 file is the source of truth for cross-device sync.
Sync on load: When you open a patent, the system reads IndexedDB first (for immediate display), then fetches the S3 copy in the background. If the S3 copy contains entries not present locally (e.g., from a search performed on another device), they are merged in. Deduplication ensures no duplicates are created.
Encryption: All search history data stored in S3 is encrypted using the same AES-GCM 256-bit encryption system used for patent notes and claim charts. You must have an active encryption session (unlocked with your password) for history to be saved to or loaded from the cloud. If encryption is not available, history still works locally via IndexedDB but will not persist across devices.
Custom libraries: Library data is stored at the account level (not per-patent) in an S3 directory. The library index (names, dates, and entry counts only) is stored in cleartext JSON for fast browsing. The actual search term data in each library is encrypted.
Popup state: The popup's position, size, open/closed state, minimized/maximized state, and z-order relative to other popups are all saved to localStorage and restored automatically on page load. This is independent of the search history data and does not require encryption.
Highlight Palette
The Highlight Palette is the color and markup mode selector that appears when you click the pencil button in the sidebar (or select "Pick Text Selection Color" from the keyboard menu).
Layout: A compact panel with six rows — one for each highlight category. Each row contains four elements:
- Category number (1–6) — a bold numeric label
- Color swatch — a small square filled with the category color, click to select that color with the current markup mode
- Highlight radio button — with a highlighter pencil icon, selects highlight (background fill) mode for that category
- Underline radio button — with an underline pencil icon, selects underline mode for that category
The six categories and their colors are:
| 1 | Priority-Red | #f44336 | '2' |
|---|---|---|---|
| 2 | Issue-Orange | #ff9800 | '1' |
| 3 | Review-Yellow | #fdd835 | '3' |
| 4 | Complete-Green | #4caf50 | '5' |
| 5 | Source-Blue | #1178cb | '4' |
| 6 | Question-Purple | #9c27b0 | '6' |
Mouse behavior: Hovering over any element shows a blue outline and announces the element via TTS (if browser reader is active). Clicking a color swatch selects that category with whatever markup mode (highlight or underline) was last used for that category. Clicking a radio button switches that category to the chosen markup mode. Moving the mouse outside the palette closes it.
Keyboard navigation: The palette functions as a 6×3 grid navigable with arrow keys:
- Arrow keys (or WASD/IJKL): move between cells in the grid
- Tab/Shift+Tab: move forward/backward through cells linearly (wrapping at edges)
- Enter/Space: activate the focused cell (select color or change mode)
- Escape: close palette and return focus to the pencil button
A tooltip appears to the right of the palette showing the currently focused item's description (e.g., "Category 3, Yellow Highlight"). TTS announces each cell as you navigate.
Mouse-Based Selection
When the highlight tool is active (a color has been selected), you create text selections by clicking and dragging across words in the document.
Cursor feedback: During selection, the cursor shows a colored pencil matching the active category color. The pencil shape reflects the current markup mode (filled pencil for highlight, stroke pencil for underline).
Selection Operations
Extend: Stretches an existing selection's start or end boundary to a new position. This happens when you drag from the boundary of an existing selection outward.
Divide: When you click in the middle of an existing selection (not at its boundary), the selection is split into two separate selections at that point.
Delete: Removes a selection by ID. If the selection is locked, deletion is blocked unless forceDelete is set. An alert informs the user: "This selection is locked and cannot be deleted."
Toggle Lock: Flips the isLocked boolean. Locked selections cannot be accidentally deleted, modified, or have their boundaries changed.
Toggle Visibility: Flips the isVisible boolean. Hidden selections are not rendered but still exist in the data.
Selection Hover Tooltip
When you hover the mouse over a highlighted or underlined selection in the document, a tooltip appears with action buttons. The tooltip is positioned just above the hovered area and contains a colored bar showing the category's background color.
Tooltip buttons (left to right):
- Copy (clipboard icon) — Opens the Citation Style Dropdown (see Section 6.2.3) to copy the selected text with a citation. Click the header to use the last-used citation style; click an option to choose a specific style.
- Change Color (pencil icon) — Opens a color palette overlay on the tooltip showing all 6 category swatches. Clicking a color changes the selection's category.
- Lock/Unlock (lock icon) — Toggles the lock state. When locked, the lock icon appears closed/solid. When unlocked, it appears open.
- Markup Toggle (highlight/underline icon) — Switches the selection between highlight (background fill) and underline markup modes.
- Visibility Toggle (eye icon) — Toggles whether the selection is visible or hidden on the page.
- Note (document icon) — Opens the annotation popup for this selection (see Section 6.2).
- Go to Document (stacked pages icon) — Opens/focuses the Annotation Document and scrolls to this selection's record.
- Delete (trash icon) — Deletes the selection. If locked, shows a confirmation dialog: "Unlock selection to delete?" with Cancel and "Unlock & Delete" buttons.
Tooltip behavior: The tooltip appears after a 50ms hover delay. Moving the mouse away starts a 500ms hide timer. If you move the mouse onto the tooltip itself, the timer is cancelled and the tooltip stays visible. Moving off the tooltip restarts the hide timer.
Screen reader announcement: When the tooltip appears, the selected text is announced via the active reader type (browser TTS or ARIA live region).
Keyboard Text Selection Mode
Activated by pressing Enter on the pencil button → choosing "Select Text" from the menu. This mode allows creating highlight selections using only the keyboard.
Initialization: The system finds the word closest to the center of the current viewport and places the cursor there (a white box with a black outline on the current word).
Navigation keys:
- Arrow Left/Right (or A/D, J/L): Move to the previous/next word on the same line
- Arrow Up/Down (or W/S, I/K): Move to the word on the line above/below, matching horizontal position as closely as possible
- Shift+Left/Right: Jump between left and right columns of the patent page
- Tab/Shift+Tab: Same as Right/Left
Creating a selection:
- Navigate to the desired start word
- Press Enter to set the anchor point
- Use arrow keys to extend the selection to the end word (the selection preview updates in real time, showing the active color with 40% opacity)
- Press Enter again to confirm and create the selection
Status tooltip: A fixed tooltip at the bottom of the screen shows the current word text and available instructions. In selection mode, it shows the word count being selected.
Exiting: Press Escape to cancel and return focus to the pencil button. After confirming a selection, focus moves to a hidden "selection text region" element. From there, pressing Tab moves to the selection's hover tooltip for further editing; pressing Escape returns to text selection mode.
Accessibility: Every word navigation triggers a screen reader announcement of the word text. Mode activation and selection confirmation are also announced.
Selection Navigation Mode
Activated by pressing Enter on the pencil button → choosing "Go to Text Selections" from the menu. This mode lets you cycle through and edit all existing selections using the keyboard.
Initialization: The system starts at the selection closest to the current viewport center.
Navigation:
- Tab: Move to the next selection
- Shift+Tab: Move to the previous selection
- Navigation wraps circularly (last → first, first → last)
Visual feedback: Each selection, when focused, is highlighted with:
- The category's fill color at 40% opacity on each word
- A 3px blue focus ring (#1178cb) with white shadow around the entire selection bounds
- Multi-column selections show separate focus rings connected by a vertical indicator
Information display: A tooltip at the bottom shows "Selection X of Y — Page N, Col C, Line L" with a truncated preview of the selected text.
Editing: Press Enter or Space on any selection to open its hover tooltip with full keyboard focus, allowing you to access all tooltip actions (copy, change color, lock, delete, open note, etc.).
Exiting: Press Escape to exit navigation mode and return focus to the pencil button.
Annotation Document Panel
6.1.1 Color Filters
Six color filter tiles at the top of the panel, matching the six highlight categories. Each tile is a checkbox-style toggle:
- Checked (active): Full-color circle with white checkmark and dark border — annotations of this category are visible in the panel
- Unchecked (inactive): Semi-transparent circle with colored checkmark and no border — annotations of this category are hidden
Clicking a filter toggles that category's visibility in the annotation record list. Hidden entries are also deselected if they were selected for bulk operations.
Sync Filters to Pages: A checkbox labeled "Filter annotations on patent pages" — when enabled, the Annotation Document's color filter state is synchronized to the page-level visibility filters (Section 2.6). Toggling a color off in the annotation document also hides those annotations on the patent pages themselves.
6.1.2 Sort Controls
Sort dropdown with four options:
- Category: Groups annotations by color category
- Cited Text: Alphabetical by the highlighted text content
- Notes: Alphabetical by note content
Sort direction button: Toggles between ascending (up arrow) and descending (down arrow). Default is ascending.
6.1.3 Text Filters
The annotation document supports content-based filtering. Filter types include:
- Cited text include-all: Show only annotations whose cited text contains ALL specified terms (semicolon-separated)
- Cited text exclude: Hide annotations whose cited text contains any of the specified terms
- Notes include/exclude: Same logic applied to note content
Filters are applied in addition to color filters. Multiple filter rows can be active simultaneously. Parsing splits the filter string by semicolons, trims whitespace, and converts to lowercase for case-insensitive matching.
6.1.4 Global Display Toggles
Keep Cited Text Open (masterShowCitedText): A checkbox that, when checked, expands the quoted text area for all annotation records. Individual records can override this with their own "cited text locked" state.
Keep Notes Open (masterShowNoteText): Same as above but for note text areas.
Record Header Mode: Radio toggle between showing cited text or notes in each record's compact header line. When set to "cited", each collapsed record shows a preview of the highlighted text; when set to "notes", it shows a preview of the note content.
6.1.5 Annotation Record List
Each annotation appears as a collapsible record entry. Records are rendered for both text selections (highlights/underlines) and screenshot frames.
Compact (collapsed) state: Shows:
- A checkbox for bulk selection
- A colored "go-to" icon (click to navigate to the annotation in the document)
- A category badge
- Inline preview text (cited text or note, based on recordHeaderMode)
Expanded state (click the record to expand): Shows:
- Quoted text area: The full highlighted text from the document
- Per-record controls:
- Cited text checkbox — lock this record's cited text to stay open even when the global toggle is off
- Notes checkbox — lock this record's notes to stay open
- Copy button — copies the note with a citation (same citation style system as the tooltip)
- Lock button — toggles lock state on the underlying selection
- Delete button — deletes the annotation (with lock challenge dialog if locked)
Bulk operations toolbar: Above the record list, a toolbar provides:
- Global select checkbox: Select/deselect all visible annotations
- Copy All Visible button with citation style dropdown
- Delete Multiple button — deletes all checked annotations, with a lock challenge dialog if any are locked
- Change Color button — opens a 6-swatch palette to change the category of all checked annotations
- Undo/Redo buttons — mirrors Ctrl+Z/Ctrl+Y for selection operations
- Sort controls (described in 6.1.2)
Annotation Popups
Each text selection can have an associated floating annotation popup that provides a rich text editor for notes, quoted text display, and citation copy features.
6.2.1 Popup Structure
Each popup contains:
- Title bar: Auto-computed title from the selection's page/column/line citation. A category-colored badge indicates the highlight category. The title bar serves as a drag handle.
- Quoted text area: Shows the highlighted text from the document. Visibility toggled by the "Selected Text" checkbox.
- Copy Note with Citation button: Opens the citation style dropdown.
- Close button (X): Closes the popup.
6.2.2 Rich Text Editor (Quill)
Font families: Times New Roman, Calibri, Arial, Cambria, Georgia, Verdana, Tahoma, Courier New
Formatting: Bold, Italic, Underline, Strikethrough, Subscript, Superscript
Colors: Text color picker and background color picker with preset color grids
Alignment: Left, Center, Right, Justify
Lists: Numbered lists and bullet lists
Indentation: Indent and outdent buttons
Clear formatting: A button to strip all formatting from selected text
6.2.3 Copy Note with Citation
The Copy Note with Citation feature provides formatted citations when copying annotation content.
How it works: Clicking the copy button header copies using the last-used citation style. Hovering over the button reveals a dropdown of available citation style options.
Citation options are dynamically built from the patent metadata and include formats like:
- Patent number abbreviation + page/column/line reference
- Exhibit reference (if an exhibit label is assigned)
- Nickname reference (if a nickname is assigned)
- Plain copy with no citation
What gets copied: Both plain text and rich HTML are placed on the clipboard. The content includes the quoted text, the note text, and the formatted citation reference. This allows pasting into Word or other rich text applications with formatting preserved.
Creating Frames
Mouse (screenshot mode): Click the camera icon to enter screenshot mode (cursor becomes crosshair). Click and drag on the document to draw a rectangle. Release to finalize. The frame must be at least 10×10 pixels; smaller frames are discarded. After creation, screenshot mode is automatically exited.
Keyboard (from camera button):
- If no frames exist: Press Enter on the camera icon to create a frame at the viewport center.
- If frames exist: Press Enter to see a menu with "New" (create at center) and "Edit Existing" (enter frame navigation mode).
Frame appearance: Each frame has a colored border and semi-transparent fill matching one of the 6 highlight categories (default: the active category when created). The color category affects the border color, fill opacity, and the category badge on the icon toolbar.
Frame Controls
A floating toolbar appears adjacent to the frame on hover or keyboard focus. The toolbar contains:
- Category badge: Shows the current category number (1–6). Click to open a color selection palette with all 6 categories.
- Lock/Unlock button: Toggle to prevent accidental move/resize. When locked, the frame cannot be dragged or resized.
- Note button: Opens an annotation popup attached to the frame (same rich text-based rich text editor as selection popups).
- Go to Document button: Opens the annotation document and scrolls to this frame's record.
- Copy button: Copies the frame content.
- Color picker button: Opens the 6-category color selection palette.
- Delete button: Removes the frame.
Moving Frames
Mouse: Drag the frame body when unlocked. The frame follows the cursor.
Keyboard (in frame navigation mode): Arrow keys, WASD, IJKL, or numpad arrows move the frame 10 pixels per keystroke. The viewport auto-scrolls to keep the frame visible during keyboard movement.
Resizing Frames
Mouse: Drag edge handles on the right, bottom, left, or top of the frame.
Keyboard: Tab from the frame to cycle through four edge handles. Each handle shows directional arrows when focused. Arrow keys expand or contract that edge (10px per keystroke, Shift for 1px precision).
Minimum size: 20px × 20px (enforced during resize).
Print Dialog
Clicking the printer icon in the sidebar (or pressing Ctrl+P / Cmd+P, which is intercepted by the app) opens a floating Print Dialog panel. The dialog appears in the upper-right corner of the screen and is draggable by its blue header bar.
Dialog contents:
Document info: Shows the document name (nickname if set, otherwise the patent number) and total page count.
Page range selection — three radio button options:
- All pages (default): Prints every page in the document (1 through total)
- Current page only: Prints just the page currently visible in the viewport
- Custom: Enables a text input where you type a page range using the format "1-5, 8, 12-15" — supports comma-separated individual pages and dash-separated ranges. Invalid entries show an alert.
Margin note font size: When margin notes are enabled, a dropdown lets you select the font size for margin note boxes (6px through 14px, default 8px).
Quality — a dropdown with three options:
- High (300 dpi, lossless): Full native resolution. Largest file size but sharpest output.
- Standard (225 dpi) (default): 75% of native resolution. Good balance of quality and file size.
- Draft (150 dpi): 50% of native resolution. Fastest to generate and smallest file.
Action buttons:
- Cancel: Closes the dialog and removes any margin note boxes
- Generate PDF: Starts the PDF generation process
Keyboard: Escape closes the dialog. Focus is placed on the Generate PDF button after the dialog opens.
PDF Generation Process
When you click Generate PDF, the app:
- Shows a progress overlay with a progress bar, percentage, and status text ("Rendering page X of Y...")
- Determines which pages to include (based on page range selection)
- Renders each page to an off-screen canvas, compositing the page image with annotation overlays
What gets rendered on each page:
- The patent page image (with any rotation applied)
- Highlight rectangles in category colors at 25% opacity
- Underline strokes in category colors (2px thickness)
- Screenshot frames with dashed borders (8px dash, 4px gap, 3px line width)
- Margin note boxes (if enabled) at the positions you arranged
- Page number footer ("Page X of Y") centered at the bottom
PDF characteristics:
- Each page can have different dimensions and orientation (landscape pages detected automatically)
- Base page size scaled from A4 dimensions with correct aspect ratio
- Output filename defaults to
_annotated.pdf
Cancel during generation: The progress overlay includes a cancel button. Setting _cancelled to true causes the render loop to exit early.
Reading Mode Menu
Clicking the reading mode button (person with sound waves icon) opens a popout menu with three options:
- Read Patent: Enters line-by-line reading mode starting from the text nearest to the viewport center
- Activate/Deactivate Browser Text-to-Speech: Toggles the built-in browser TTS reader on or off. The label dynamically changes between "Activate" and "Deactivate" based on current state.
- Text-to-Speech Settings (arrow indicates submenu): Opens a settings submenu with:
- Rate slider: Speech speed from 0.5 to 2.0 (step 0.1, default 1.0)
- Pitch slider: Voice pitch from 0.5 to 2.0 (step 0.1, default 1.0)
- Volume slider: Speech volume from 0.0 to 1.0 (step 0.1, default 1.0)
- Language dropdown: Lists available speech synthesis voices from the browser (defaults to en-US)
- Test Voice button: Speaks "Testing voice." with current settings
The menu and submenu are fully keyboard navigable: Arrow Up/Down cycles options, Arrow Right opens the settings submenu, Enter/Space activates, Escape closes.
Reading Mode Navigation
Once reading mode is entered, the app finds the line closest to the viewport center and begins there. Navigation is entirely keyboard-driven:
| Key | Action |
|---|---|
| Arrow Down / S / K | Move to the next line |
| Arrow Up / W / I | Move to the previous line |
| Arrow Left / A / J | Switch to the left column |
| Arrow Right / D / L | Switch to the right column |
| Space | Repeat (re-read) the current line |
| Enter | Convert the current line position to keyboard text selection mode |
| Escape | Exit reading mode, return focus to the reading mode button |
Column switching: When switching columns, the system finds the line in the target column closest to the current line number, preserving your approximate vertical position.
Page transitions: At the end of the last line on a page, pressing Down automatically moves to the first line of the next page (in the same column if available, otherwise switching columns). Similarly, pressing Up at the first line moves to the last line of the previous page.
End of document: Attempting to navigate past the beginning or end of the document announces "Beginning of document" or "End of document."
Built-in Browser TTS Reader
When the browser reader is activated (via the reading mode menu), it provides two capabilities:
Reading mode speech: In reading mode, each line's text is spoken aloud using the Web Speech Synthesis API. Hyphenated words split across line breaks are automatically joined. Duplicate words from linked-range entries are de-duplicated.
Global UI announcements: When the browser reader is active, ALL focusable UI elements throughout the application announce themselves on focus. This is accomplished by the announceOnFocus() function added to every sidebar button and by the addBrowserTTSFocusHandler() method added to interactive elements. Each announcement includes the element's role, label, and state (selected, disabled, expanded, pressed, etc.).
TTS settings persistence: Rate, pitch, volume, and language settings are stored in this.state.ttsSettings and saved as part of the app state.
Visual indicator: When the browser reader is active, the reading mode button gets a blue highlight (semi-transparent blue background with inset blue border and border-radius).
Cross-tab sync: When you change the reader type (browser vs. 3rd party), the change is broadcast to all other Patent Lightning tabs via cross-tab sync system (TTS_STATUS_CHANGED event) so all tabs use the same reader configuration.
Compatibility with 3rd-Party Screen Readers
For users of JAWS, NVDA, VoiceOver, or other screen readers, Patent Lightning provides comprehensive ARIA support:
- ARIA roles on all interactive elements: button, dialog, menu, menuitem, slider, region, status, document, toolbar, main, timer, progressbar, checkbox, radio, radiogroup, listbox, option, alert, group, text
Color Assist Mode
Color Assist Mode adds visual patterns and numeric labels to colored selections so that categories can be distinguished without relying on color alone. See Section 1.15 for toggle details.
What changes when enabled:
- Each of the 6 highlight categories receives a distinct pattern overlay (via CSS background patterns)
- Category number indicators (1–6) appear in the document margin alongside highlighted text
- Pulsing animations for the current search result use opacity changes instead of color flashes
- All six category filter buttons on each page and in the annotation document show their numeric labels prominently
Early initialization: To prevent a flash of inaccessible content on page load, the color assist state is checked by an inline <script> in the HTML
that reads the colorAssistMode cookie and applies a color-assist-mode-pending class before any CSS loads. The main initialization then removes this pending class and applies the proper color-assist-mode class.Keyboard Navigation
Patent Lightning is designed for full keyboard operation:
Sidebar navigation: F6 jumps to the first sidebar button. Tab/Shift+Tab cycles through all buttons. Tab wraps from last (Account) back to first (Open/Save) and vice versa.
Button activation: Enter or Space activates any focused button. Buttons that open menus (pencil, reading mode, screenshot) present keyboard-navigable option menus.
Focus indicators: Every focusable element shows a 2px solid blue (#1976d2) outline with 2px outlineOffset when focused. This is applied programmatically in setupUIControls() via focus/blur event handlers on each button.
Dialog focus trapping: All dialogs (Go-To-Page, lock challenge, join challenge, settings, etc.) trap Tab within their bounds. The first and last focusable elements are linked: Tab from last wraps to first; Shift+Tab from first wraps to last. Escape closes the dialog and restores focus to the trigger element.
Three keyboard tool modes: The highlight tool provides three distinct keyboard modes (text selection, selection navigation, boundary editing) all accessible without a mouse. See Sections 5.6, 5.7, and 5.8.
Screen Reader Support
ARIA landmarks established on initialization:
Announcement system: The accessibility system class creates two hidden announcement regions:
What gets announced:
- Selection operations: "Selected N words: [text]" or "Selection removed"
- Page navigation: "Page X of Y"
- Search results: "Found N results for [query]" or "No results found for [query]"
- Mode changes, dialog openings/closings, bookmark changes
- Every word during keyboard text selection mode
- Every line of text during reading mode
Left Ribbon Menu
Group 1 — Storage & Editing
Group 2 — Templates & Structure
Group 3 — Formatting & Color
Group 4 — Utilities
Ribbon Keyboard Navigation
Tab/Shift+Tab cycles through enabled ribbon buttons in a loop (last button wraps to first, first wraps to last). Each button supports Enter or Space to activate. Focus-visible styling matches hover styling (blue background, white text). The skip link "Skip to main content" is the first focusable element in the DOM and jumps focus to the main chart editor area.
Chart Editor Area
Column Resize
Cell Editing
Multi-Cell Selection
Users can select multiple cells in three ways:
- Ctrl/Cmd+Click — Toggles individual cells in/out of the selection without entering edit mode.
- Shift+Ctrl+Arrow — Extends the selection from the anchor cell in the arrow direction, one cell at a time. The selection rectangle updates visually with each key press.
Context Menu
Clipboard Operations
- Cut / Cut Cell — Same selection logic as Copy but removes the content. Focuses the cell first for the cut to work properly.
Merge Operations
- Merge Cells — Enabled only when 2+ cells are selected. Merges the selection rectangle into a single cell. Content from all cells is concatenated into the anchor cell (top-left). Shows a confirmation dialog stating "Merge N cells into one?" with Cancel and Merge buttons. The dialog supports keyboard navigation with arrow keys between buttons and Enter to confirm.
- Unmerge Cells — Enabled only when the right-clicked cell is part of a merge. Finds the anchor cell and separates it back into individual cells. The anchor retains all content; placeholder cells become empty.
Row Operations
- Insert Row Above — Inserts an empty row above the right-clicked row. All cell merge references below are updated.
- Insert Row Below — Inserts an empty row below the right-clicked row.
Column Operations
- Insert Column Left — Inserts a new column to the left of the right-clicked column. Column widths are recalculated.
- Insert Column Right — Inserts a new column to the right.
Delete Operations (styled in red)
- Delete Row — Removes the row. Blocked if the row is part of a merged region (shows error toast: "Cannot delete rows in merged region. Unmerge first.").
- Delete Column — Removes the column and its data from all rows.
Context Menu Behavior
Undo/Redo System
The undo system object maintains two stacks (undo and redo) with a maximum history of 50 snapshots.
Undo/Redo Operations
Page Setup
Page Size & Orientation
- Page Size — Letter (8.5" × 11"), Legal (8.5" × 14"), or A4 (210mm × 297mm). Default: Letter.
- Orientation — Portrait or Landscape. Default: Landscape. The page dimensions swap width/height based on orientation.
Margins
Four numeric inputs for Top, Bottom, Left, and Right margins in inches (0–5, step 0.1). Default: 1 inch on all sides. A Presets dropdown offers Normal (1" all), Narrow (0.5" all), Moderate (1" top/bottom, 0.75" left/right), and Wide (1" top/bottom, 2" left/right). Selecting a preset updates all four margin inputs. Manual changes switch the preset to "Custom."
Border Settings
Three checkboxes at the top: "Show chart title" (default: on), "No borders" (removes all), "Header line only" (shows only the line below the header row).
Six border controls arranged in a 2-column grid, each showing a visual border icon preview alongside weight and style dropdowns:
- Title Outline — Border weight (0–4pt) and style (none, solid, dashed, dotted). Default: 2pt solid.
- Table Outside — Outer border of the data area. Default: 2pt solid.
- Header Bottom — Line below the header row. Default: 2pt solid.
- Header Vertical — Vertical separators between header cells. Default: 1pt solid.
- Row Separators — Horizontal lines between data rows. Default: 1pt solid.
- Column Separators — Vertical lines between data columns. Default: 1pt solid.
A live preview panel updates in real-time as settings change, showing a miniature representation of the chart borders.
Row Height
Three row type controls (Title, Header, Body), each with a mode selector:
- Auto — Height adjusts to fit content (default for all three).
- Fixed — Height locked to a specified value in points (enabled with a numeric input). Title default: 30pt, Header default: 30pt, Body default: 45pt.
- Fill (Body only) — Rows expand to fill available page space.
Cell Padding
A radio group to select which section to edit (Title, Header, or Body), with an "All" checkbox to apply changes across all three simultaneously. A "Uniform padding" checkbox makes all four sides match. Four dropdowns (Top, Right, Bottom, Left) with options from 0 to 16 pixels. Default: 8px uniform.
Multi-Page Options
Three checkboxes:
- "Repeat title on each page" (default: off)
- "Repeat header row on each page" (default: on)
- "Show page numbers" (default: on)
Modal Behavior
Templates
The template system provides 25 predefined chart layouts in 9 categories, loaded via the templates popout panel.
Categories and Templates
Invalidity (3 templates):
Invalidity/Obviousness (Section 103 — 6 columns: Claim Limitation, Primary Reference, Secondary Reference, Tertiary Reference, Motivation, Expert), Anticipation (Section 102 — 4 columns), Prior Art Chart (5 columns).
Construction (3 templates):
Claim Construction 3-column (Pre-Markman), 4-column (Post-Markman with Court column), and 5-column (Full Analysis).
Infringement (4 templates):
Infringement Analysis (Element-by-Element, 4 columns), Literal Infringement (Direct Comparison, 4 columns), DOE 6-column (Function/Way/Result Analysis), DOE 4-column (Differences Analysis).
Special (3 templates):
Post-Grant (2 templates):
IPR Petition (Inter Partes Review, 5 columns), PGR Chart (Post-Grant Review, 4 columns).
ITC & Licensing (2 templates):
ITC Complaint (Section 337, 4 columns), License Comparison (Terms Analysis, 5 columns).
Portfolio (3 templates):
Prosecution History (File Wrapper, 4 columns), Patent Portfolio (Asset Overview, 6 columns), Patent Family (Related Patents, 5 columns).
Damages (2 templates):
Damages Analysis (Lost Profits/Royalty, 5 columns), Royalty Analysis (Georgia-Pacific, 5 columns).
Trade Secret (1 template):
Trade Secret Misappropriation (4 columns).
General (3 templates):
Simple 3-column, Simple 4-column, Comparison Chart (5 columns with Winner column).
Chart Storage & File Management
Save Operations
Save to Cloud — Encrypts the chart data via encryption system, uploads to cloud storage under the user's folder path, and registers the chart in cloud database. The chart appears in the Patent Library alongside patent files.
Save-As — Forces a new file dialog (Computer) or clears the cloud key to create a new cloud entry (Cloud). The "Both" option performs Save-As to both destinations sequentially.
Open Operations
Auto-Save
- Idle time — How long to wait after the last edit before auto-saving (default: 30 seconds).
- Fallback time — Maximum interval between saves regardless of activity (default: 15 minutes).
- Throttle — Minimum time between saves (default: 60 seconds).
- Destination — Computer, Cloud, Both, or Off.
- Max retries — 3, with exponential backoff (2s, 4s, 8s delays).
The auto-save system listens for claimchart:dirty events. When dirty, it starts an idle timer. If the user stops editing for the idle period, a save is triggered. A separate fallback interval ensures periodic saves during continuous editing. The save indicator appears as a small flash animation. Auto-save can be enabled/disabled from the Storage popout's Auto-Save submenu.
Word Export
Keyboard Shortcuts Reference
Global Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl+S | Quick save (saves to last-used location) |
| Ctrl+Z | Undo |
| Ctrl+Shift+Z or Ctrl+Y | Redo |
| Ctrl+B | Bold (in cell editing or multi-cell selection) |
| Ctrl+I | Italic |
| Ctrl+U | Underline |
| Ctrl+M | Merge/Unmerge cells (shows confirmation dialog) |
| Escape (in cell) | Exit edit mode, focus Storage button |
| Escape (in fill/text color mode, 1st) | Ready for navigation |
| Escape (in fill/text color mode, 2nd) | Exit mode completely |
| Escape (in margin controls) | Focus Storage button |
Cell Navigation
| Shortcut | Action |
|---|---|
| Ctrl+Arrow Up/Down/Left/Right | Move focus to adjacent cell |
| Shift+Ctrl+Arrow Up/Down/Left/Right | Extend multi-cell selection |
| Ctrl/Cmd+Click | Toggle cell in/out of selection |
| Tab | Move to next cell (right, then down) |
| Shift+Tab | Move to previous cell |
Fill Color Mode (after selecting a color)
| Shortcut | Action |
|---|---|
| Alt+C | Enter fill color keyboard mode |
| Alt+R | Enter eyedropper mode (sample cell color) |
| Arrow keys | Navigate between cells |
| Enter | Apply fill color to focused cell |
| Escape (1st) | Ready for navigation |
| Escape (2nd) | Exit fill mode |
Text Color Mode (after selecting a color)
| Shortcut | Action |
|---|---|
| Alt+T | Enter text color keyboard mode |
| Arrow keys | Navigate between cells |
| Enter | Apply text color to focused cell |
| Escape (1st) | Ready for navigation |
| Escape (2nd) | Exit text color mode |
Context Menu
| Shortcut | Action |
|---|---|
| Right-click on cell | Open context menu |
| Arrow Up/Down | Navigate menu items |
| Enter | Activate focused menu item |
| Escape | Close menu, restore previous focus |
| Home | Jump to first menu item |
| End | Jump to last menu item |
Speech Popout
| Shortcut | Action |
|---|---|
| Arrow Up/Down or Tab | Navigate speech menu items |
| Enter or Space | Activate item |
| Escape | Close popout, return focus to Speech button |
| Arrow Right (on Settings) | Open TTS Settings submenu |
Ribbon Menu
| Shortcut | Action |
|---|---|
| Tab | Move to next ribbon button |
| Shift+Tab | Move to previous ribbon button (wraps around) |
| Enter or Space | Activate focused button |
Page Setup Modal
| Shortcut | Action |
|---|---|
| Tab | Navigate between controls |
| Arrow keys | Navigate within dropdowns |
| Escape | Close dropdown or close dialog |
| Enter | Confirm selection in dropdown |
Layout
The library interface is divided into three visual zones:
Toolbar — A horizontal row of action buttons spanning the top of the page. Contains buttons for adding patents, creating folders, clipboard operations, search, backup/restore, text-to-speech settings, account management, and closing the library.
Folder Tree (left panel) — A collapsible tree showing your folder hierarchy. The tree always starts with the root "Patent Library" node at the top, followed by user-created folders (nested up to 12 levels deep), an optional Archive folder, and a "Deleted Items" node at the bottom. The panel is resizable by dragging the vertical divider between the two panels; it can be sized from 15% to 60% of the window width.
Patent Table (right panel) — The main content area showing the patents in the currently selected folder. Displays a table with sortable columns, checkboxes for multi-selection, inline editing, expandable notes rows, and a sticky header with the current folder path and a patent number input bar.
Add New Patents
Opens a popout panel with two ways to add patents: uploading PDF files or downloading by patent number.
→ See Section 4: Adding New Patents for complete details.
New Folder
Creates a new subfolder inside the currently selected folder. Clicking displays a browser prompt where you type the folder name. If no folder is selected or the current selection is invalid, the folder is created at the root level. The tree refreshes immediately to show the new folder.
Rename
State: Disabled when the root folder or no item is selected.
Renames the currently selected item. For folders, a prompt asks for the new name, and the rename propagates to any associated cloud storage note paths. For patents, the prompt asks for a new title. After renaming, both the tree and patent table refresh.
Delete
State: Disabled when the root folder is selected or nothing is selected.
Deletes the currently selected item(s). This is a soft delete — items move to the Deleted Items trash and can be restored within 30 days. A confirmation dialog always appears first.
The delete operation handles multiple item types: if notes are selected (checkboxes in the expanded notes rows), those are deleted; otherwise, if patent checkboxes are checked, those patents are removed from the current folder; otherwise, the selected folder is deleted. Deleting a folder that contains subfolders or patents shows an additional warning.
Copy / Move / Paste
State: Copy and Move are disabled when nothing is selected. Paste is disabled when the clipboard is empty.
These three buttons work together as a clipboard system for organizing patents, folders, notes, and claim charts across folders.
Copy places the selected item(s) on an internal clipboard. The clipboard can hold patents (single or multi-selected), folders, claim charts, notes, or any combination. Clipboard contents are tagged with their source folder ID and item type.
Move works like Copy but marks the clipboard contents for move (the items will be removed from the source folder when pasted). The distinction between copy and move is indicated by the clipboard's type property (e.g., 'patent' vs 'patent-move', 'items' vs 'items-move').
Paste places the clipboard contents into the currently selected folder. For patents, a copy operation creates a new folder-patent association in cloud database and copies any associated cloud notes to the destination path. A move operation instead removes the association from the source folder and moves notes to the new path. For folders, paste currently supports only the existing Copy behavior. For notes, individual note cloud storage objects are copied (or moved) to the destination folder's cloud storage path, and the parent patent is auto-copied to the destination folder if it doesn't already exist there.
Drag-and-drop as an alternative: You can also drag patents and folders between folders in the tree panel instead of using the clipboard. Drag defaults to Copy; hold Shift while dropping to Move. A floating tooltip follows the cursor showing "Copy" (blue) or "Move" (red) depending on whether Shift is held.
Search
Opens the Library Search dialog.
→ See Section 8: Library Search for complete details.
Backup Folder / Restore Folder
Backup Folder creates a ZIP archive of the currently selected folder, including all subfolders, patent folders, notes (as HTML files), and claim chart files. The backup process:
- Confirms the action with a dialog listing what will be included.
- Ensures the encryption session is unlocked (prompts for password if needed, since notes must be decrypted for export).
- Recursively collects all subfolders of the selected folder.
- Also includes any claim charts associated with each folder.
- Shows a progress dialog with percentage and stage descriptions.
The ZIP filename follows the pattern FolderName_YYMMDD_HHMM.zip.
Restore Folder accepts a .zip file and imports its contents back into the library. Click the button to open a file picker filtered to .zip files.
Structure
The folder tree occupies the left panel and displays a hierarchical view of your patent organization. It always contains:
- Patent Library (root) — The top-level node, displayed with the Patent Lightning logo icon and the text "Patent Library." Clicking this selects the root folder and shows all patents filed directly at the top level.
- User folders — Created folders appear below the root, nested up to 12 levels deep (the MAX_DEPTH constant in the DB layer). Each folder shows a yellow folder icon, its name, and a chevron arrow (▶) if it has subfolders. Expanded folders show a rotated chevron (▼).
- Archive — If an Archive folder exists (created automatically or manually), it appears below user folders with a distinctive archive box icon. The Archive folder is protected: it cannot be deleted or renamed.
- Deleted Items — Always visible at the bottom of the tree with a trash can icon and dimmed styling (opacity: 0.7). Selecting this displays the trash view instead of a patent table.
Navigation
Mouse: Click any folder to select it and display its contents in the patent table. If the folder has subfolders, clicking it also toggles its expanded/collapsed state. You can click the chevron arrow alone to toggle expansion without changing the selection.
Drag and Drop
Folders support drag-and-drop reordering:
Dragging folders: Every folder (except root) is draggable="true". Dragging a folder and dropping it on another folder moves the dragged folder to become a child of the target.
Dragging patents onto folders: Patent rows from the table can be dragged onto folders in the tree. By default, this copies the patent to the target folder. Holding Shift during the drop moves it instead (removing it from the source folder). A floating tooltip near the cursor shows "Copy" (blue) or "Move" (red).
Dragging external PDFs onto folders: You can drag PDF files from your desktop directly onto a folder in the tree. A tooltip shows "Drop to add to [folder name]" as you hover over the folder. Dropping on a shared folder is blocked with an error message ("New patent PDFs cannot be added to shared folders").
Dragging to Deleted Items: Dragging patents, folders, charts, or notes to the Deleted Items node soft-deletes them (with a confirmation dialog). External PDF files cannot be dropped on the trash.
Circular reference prevention: The system checks isDescendantOf() before completing a folder move to prevent creating circular folder hierarchies (e.g., dragging a parent folder into one of its own subfolders).
Folder Context Menu
Right-clicking a folder in the tree (or pressing Shift+F10 on a focused folder) displays a context menu with these options:
- Open — Selects the folder and displays its contents.
- New Folder — Creates a subfolder inside this folder.
- Rename — Prompts for a new folder name.
- Delete — Soft-deletes the folder (to trash).
- Copy — Places the folder on the clipboard.
- Paste — Pastes clipboard contents into this folder.
The Rename and Delete options are disabled for the root folder.
Add New Patents Popout
Click the Add New Patents toolbar button to open a popout panel. The popout is available on the Patent Viewer, Claim Chart, and Patent Library pages. It provides three input methods:
Download by Patent Number
A text input field at the top accepts patent numbers in a variety of formats. You can type or paste one or more patent numbers separated by commas, spaces, or newlines. The system uses pattern matching to parse the input and extract valid patent number candidates.
Supported formats include:
- US granted patents: 11646472, US11646472, US11646472B2, 6334217
- US applications: 20250241222, US20250241222A1
- US reissues: RE45123, USRE45123
- International patents with known country codes: EP1234567, WO2021123456, JP2022001234, CN115000000, and 40+ other country codes
The input field has a Go button and a Paste button (which reads the clipboard and immediately processes its contents). Pressing Enter in the input field also triggers processing.
Drop Zones
Below the patent number input and options, the popout shows two side-by-side drop zones:
- Left zone — Upload Patent PDFs: A red PDF icon with the label "Drop patent PDFs here" and a Choose PDFs button. Drop or pick one or more patent PDF files to upload them directly. Dragging a PDF onto this zone highlights it with a blue border.
- Right zone — Import from Document: A blue document icon with the label "Drop doc to extract numbers" and a Choose Doc button. Drop or pick a single document (.txt, .docx, .pdf, or .xml) to extract patent numbers from it. See the Import Patents from Document section below for full details.
Options
The popout includes three checkboxes between the patent number input and the drop zones:
- Confirm before downloading — When checked, shows a confirmation dialog listing all discovered patents before downloading begins.
- Open PDF in new tab — When checked, each patent's PDF is opened in a new browser tab after download.
- Generate AI chart — When checked, enables Bedrock AI-powered claim chart generation for the uploaded patents.
All three checkbox states are saved to your browser and persist across sessions.
Import Patents from Document
The document import feature lets you extract patent numbers from an existing file — such as a prior art search report, an office action, a litigation document, or any text that references patents — and add them to your library in bulk. It is available on all three pages that include the Patent Library: the Patent Viewer, Claim Chart, and Patent Library pages.
How to Access
Open the Add New Patents popout. The right-hand drop zone, labeled "Drop doc to extract numbers," is the document import zone. You can either:
- Drag and drop a document file onto the zone (the border turns blue and the background highlights while dragging over it), or
- Click the Choose Doc button to open a file picker.
Only one document can be processed at a time. If you need to import from multiple documents, repeat the process for each file.
Supported File Types
The importer accepts four file formats:
- .txt — Plain text files. Read directly as UTF-8 text.
- .docx — Microsoft Word documents. The importer unzips the document and extracts text from the main body, headers, footers, footnotes, and endnotes. Requires the JSZip library (already loaded by Patent Lightning).
- .pdf — PDF documents with a text layer. The importer decompresses content streams and extracts text from PDF text operators. Note: Scanned PDFs that contain only images (no text layer) cannot be processed. If text extraction fails, an error message will suggest converting to .txt first or pasting patent numbers directly.
- .xml — XML files such as USPTO patent XML or structured data exports. XML tags are stripped and text content is preserved.
Patent Number Detection
After extracting text from the document, the importer scans for patent numbers using a comprehensive set of patterns. Detected formats include:
- US granted patents with or without prefix, commas, or kind codes (e.g.,
11,646,472,US 8,123,456 B2,US11646472B2) - US published applications (e.g.,
US 2021/0123456 A1,20250241222,US20130024207A1) - US reissue patents (e.g.,
RE37,489,US RE45123 E) - PGPUB-prefixed numbers (e.g.,
US PGPUB 20170356551) - "Pat. No." and "Patent No." inline references
- PTO-892 citation format (e.g.,
US 8,123,456 B2, 03/20/2012, Smith) - Bare numeric patent numbers at word boundaries (5–8 digit numbers)
Duplicate patent numbers are removed automatically. When the same patent number appears in different formats (e.g., US 11,646,472 B2 and 11646472), the first occurrence is kept and subsequent duplicates are filtered out.
Review Popup
After scanning, a Patent Numbers Found popup appears showing all extracted patents. The popup has a blue header bar and is draggable (by the header) and resizable (by the corner handle). Its position and size are saved to your browser for next time.
The popup displays:
- Summary bar — Shows the count of patents found and the source filename, along with a Select All checkbox.
- Results list — A scrollable list where each row shows:
- A checkbox (checked by default) to include or exclude the patent.
- The normalized patent number in bold monospace text (e.g.,
US11646472). - A context line showing the surrounding text from the source document — five words before the match, the matched text highlighted in blue, and five words after. This helps you confirm each detection is a real patent reference and not a false positive (such as a phone number or date).
- Footer — Shows a count of selected patents (e.g., "8 of 12 selected") and Cancel / Submit buttons. The Submit button updates to show the count (e.g., "Submit 8 Patents"). It is disabled when no patents are selected.
Use the checkboxes to deselect any false positives or patents you do not want to add. Click Submit when ready, or press Escape or the ✕ button to cancel.
What Happens After Submit
When you submit your selection, each patent is checked against your existing library:
- Patents already in your library are added to the currently selected folder (if not already there) without re-downloading. No duplicate uploads occur.
- New patents (not yet in your library) are sent through the standard download pipeline — downloaded from USPTO via the CORS proxy and uploaded to cloud storage for processing.
A status message below the drop zones reports the outcome, for example: "3 already in library; downloading 5 new". If all submitted patents are already in your library, the message confirms this: "All 8 patents already in library".
The standard popout options apply to new downloads: if Confirm before downloading is checked, the confirmation dialog appears before the download begins. If Open PDF in new tab is checked, each downloaded PDF opens in a new tab. If Generate AI chart is checked, AI claim chart generation runs for each new patent.
Limitations
- Scanned PDFs without a text layer cannot be processed. The importer will show an error message suggesting alternatives.
- International patent numbers (EP, WO, JP, CN, etc.) are detected if they include a recognizable country code prefix. Bare foreign patent numbers without a prefix may not be detected.
- Very short numbers (fewer than 5 digits) are not matched, to avoid false positives from dates, page numbers, or other short numeric strings.
- Only one document can be imported at a time. For multiple source documents, repeat the import for each file.
Upload Pipeline
Whether you upload a PDF file or download by patent number, patents go through the same pipeline:
- Screening (synchronous) — upload validator.screenFiles() checks file extensions (must be .pdf) and validates that the filename matches a recognized patent number pattern. Rejected files are shown in a modal popup listing each file and its rejection reason.
- Validation (async per file) — upload validator.validateFile() performs deeper checks:
- File size must be between 10 KB and 500 MB.
- PDF magic bytes (%PDF-) must be present at the start of the file.
- The %%EOF marker must be present in the last 1024 bytes.
- PDF metadata cross-check: if the file has /Title or /Subject metadata, the patent number digits in the filename must appear in that metadata. A mismatch indicates a misnamed file and the upload is rejected.
- Patent number normalization — The filename (minus .pdf) is normalized to a canonical form:
- US granted patents: US + 8 zero-padded digits, kind code stripped (e.g., 6334217 → US06334217, US11646472B2 → US11646472)
- US applications: US + 11 digits (e.g., 20250241222 → US20250241222)
- US reissues: USRE + 5 or 6 zero-padded digits (e.g., RE45123 → USRE045123)
- International patents: country code + digits, kind code stripped, no padding
- cloud database record — A patent metadata record (PATENT_META#) and a patent-folder association record (PATENT_FOLDER#) are created in cloud database.
- For downloads by number: Before the cloud storage upload, the system downloads the PDF from USPTO via patent downloader.downloadPdf(). The download URL is constructed through a CORS proxy Lambda (configured in AWS_CONFIG.usptoProxyUrl). Progress shows as 0–50% for the download phase and 50–100% for the cloud storage upload phase.
Backend Processing
After a patent PDF is uploaded to cloud storage, a backend pipeline processes it (outside the browser):
- OCR — Text is extracted from each page.
- Proofing — OCR results are verified and corrected.
- Matching — Patent claims and elements are identified.
Table Columns
The patent table displays the following columns, left to right:
- Checkbox (30px) — A selection checkbox for multi-select operations. A "Select All" checkbox in the header toggles all patents in the current folder.
- Open in Viewer (40px) — A Patent Lightning bolt icon button. Clicking opens the patent in the Patent Viewer in a new browser tab. The button also serves as the drag handle for drag-and-drop operations: drag from this icon to copy or move the patent to another folder. Before opening, the system checks if the patent is still processing (blocks with a message if not ready) and whether it's already open in another tab (shows a warning dialog via cross-tab sync system).
- Notes Toggle (appears only when notes exist) — A small chevron arrow that expands or collapses an inline notes row beneath the patent. Hidden by default; becomes visible after an asynchronous check finds saved notes for this patent in S3. A blue badge next to the arrow shows the note count.
- Open PDF (40px) — A red PDF icon button. Clicking generates a pre-signed cloud storage URL for the patent's PDF file and opens it directly in a new browser tab. Tracks the action in recent files.
- Identifier (200px) — A user-assigned identifier for the patent (e.g., a short code like "Prior Art 1" or "Doe '472"). Displays "-" if not set. Double-click to edit inline.
- Exhibit (100px) — An exhibit designation (e.g., "Ex. A", "1001"). Displays "-" if not set. Double-click to edit inline.
- Patent Number (180px) — The canonical patent number (e.g., "US11646472"). Not editable inline.
- Title (flexible width, fills remaining space) — The patent title. Displays "Untitled" if not set. Double-click to edit inline.
- Status (100px) — The processing status. Shows "Ready" (green text) when the patent is fully processed, "Processing..." (orange) when the backend pipeline is still working, or other status values.
- Date (170px) — The date the patent was added to this folder, formatted as a locale-appropriate date/time string.
Sorting
Clicking a column header toggles sorting by that column. The first click sorts ascending, the second click reverses to descending, and the third click reverses again. The sorted column shows a triangle indicator (▲ or ▼) in its header.
Sortable columns are: Identifier, Exhibit, Patent Number, Title, and Date.
The sort state (sortColumn and sortDirection) is maintained in the organizer's state object and persists as long as the library is open.
Selection
Single selection: Click any patent row to select it (sets selectedPatentId). The row receives a light blue highlight.
Multi-selection: Use the checkboxes to select multiple patents. The Select All checkbox in the header toggles all patents. Multi-selection enables bulk operations: Delete, Copy, Move, and drag-and-drop all operate on all checked patents.
Inline Editing
The Identifier, Exhibit, and Title columns support inline editing. Double-click a cell to enter edit mode:
- The cell content is replaced with a text input pre-filled with the current value.
- Press Enter or click away (blur) to save the new value.
- Press Escape to cancel without saving.
Notes Expansion
Each patent row can have an expandable notes section. After the patent table renders, the library asynchronously checks cloud storage for saved notes for each patent (via cloud storage system.listNotesVersions()). When notes are found:
- The notes toggle arrow becomes visible.
- A blue badge appears showing the note count.
- Clicking the toggle reveals a row beneath the patent containing a list of individual note items.
Shared Folders
Patent Lightning supports shared folders that allow multiple users to collaborate on patent collections. The shared folder system is managed through shared-folder-ui.js, shared-folder-manager.js, and shared-folder-crypto.js.
Shared folders appear in the folder tree with a distinctive visual style (shared icon, different styling than personal folders). They support member management with different permission levels and use end-to-end encryption so that shared data is encrypted with a shared key that only authorized members can access.
Key restrictions: New patent PDFs cannot be uploaded directly to shared folders. If you drag a PDF onto a shared folder in the tree, an error message appears: "New patent PDFs cannot be added to shared folders." Patents must first be uploaded to a personal folder and then copied/moved to a shared folder.
The shared folder system handles: creation of shared folders with encrypted key exchange, inviting and managing members, permission levels (view, edit, admin), subfolder creation within shared folders, and real-time synchronization of shared content across members.
Library Search
## Search Dialog
Click the Search toolbar button to open a centered modal dialog. The dialog contains a text input with the placeholder "Search by patent number, identifier, title, or note filename…" and two buttons: Cancel and Search. A tip below the input reads: "Enter partial text like '472' to find matching patents, notes, and claim charts."
Press Enter to search or Escape to close. The dialog has a full focus trap (Tab wraps within the dialog elements).
## Search Scope
The search is cross-folder — it searches across all folders in your library, not just the currently selected one. Before searching, the system calls loadAllFolders() to ensure all patent data is loaded.
The search matches against:
- Patent fields: patent number, identifier, exhibit, title, and folder path (case-insensitive substring match).
- Claim charts: chart ID, display name, title, and folder path.
## Search Results
Search results replace the patent table with a special results view showing all matching items across all folders. Each result row shows the item's folder path so you can see where it lives in your hierarchy.
Results can include three types of items: patents, claim charts, and notes. The results view supports the same sort and selection controls as the regular patent table.
A "Clear Search" button at the top of the results returns you to the normal folder view.
When you click a patent in search results, the library navigates to that patent's folder, selects it, and highlights the patent row with a blue flash animation (the targetPatentNumber mechanism described in Section 5.7).
Trash & Purge
## Deleted Items View
Selecting the "Deleted Items" node in the folder tree displays a special view instead of the patent table. The view shows a list of all soft-deleted items, sorted newest first.
Each item shows: a checkbox for selection, a type-specific icon (folder, patent, claim chart, or note), the item name, its original path ("from: Patent Library > Folder A"), type label, deletion date, and the number of days remaining before automatic purge.
## Item Types in Trash
- Folders (FOLDER#) — Deleted folders with their name and original path.
- Patent-Folder associations (PATENT_FOLDER#) — A patent's presence in a specific folder. The patent PDF itself is not deleted; only the folder link is removed.
- Patent metadata (PATENT_META#) — Global patent metadata (rare; typically only patent-folder links are deleted).
- Claim charts (CLAIMCHART_FOLDER#) — Claim charts removed from folders. The display name is fetched from the CLAIMCHART_META# record.
- Notes (NOTES_TRASH#) — Individual note files that were deleted. Stores both the original cloud storage key and the trash cloud storage key for restoration.
## Restore
Each deleted item has an individual Restore button (green) that restores it to its original location. For folders, the system checks if the parent folder still exists and falls back to root if not. For notes, the cloud storage object is copied from the trash location back to its original key.
A Restore Selected button (also green) at the top of the trash view allows bulk restoration. Select items using checkboxes (or the Select All checkbox), then click to restore all selected items in one operation.
## Purge
Each deleted item has a Purge button (red) that permanently deletes it. This action cannot be undone. For notes, the cloud storage object is permanently deleted from both the trash and original locations.
Items are automatically purged after 30 days. The remaining days are shown next to each item (e.g., "28 days left").
Patent Image Cache
The Patent Image Cache is an local storage-based local caching system for patent page PNG images. It is managed by the image cache class (global singleton at window.patentImageCache).
## Purpose
When you view a patent in the Patent Viewer, each page is downloaded as a PNG image from S3. The image cache stores these images locally so that reopening the same patent loads instantly from the local cache instead of re-downloading from S3.
## Settings
The cache has four configurable settings, accessible via a settings panel within the storage popout:
- Enable Cache — On/off toggle for the entire cache system. Default: on.
- Patent Age — Maximum number of days to keep cached images before they expire. Range: 1–180 days. Default: 60 days.
- Memory Allocation — Maximum total size of the image cache in megabytes. Range: 100–2000 MB. Default: 500 MB.
- Number of Patents — Maximum number of distinct patents to keep cached. Range: 1–500. Default: 500.
## Cache Operations
Reading: When the viewer needs a page image, it first checks the cache via getImage(userId, patentNumber, pageNumber). If a cached entry exists and hasn't expired, the cached blob is returned immediately. If the entry has expired, it's deleted and a cache miss is returned.
Writing: After downloading a page image from cloud storage, it's stored via putImage() with the blob, dimensions, and metadata. The cache key format is {userId}_{patentNumber}_{pageNumber}.
Purging: When storage limits are exceeded (total size or patent count), the oldest-accessed patents are evicted first (LRU strategy). The _purgeIfNeeded() method handles this automatically after writes and settings changes.
Statistics: The getCacheStats() method returns total size in MB and patent count, displayed in the settings panel.
## local storage Schema
- images — Stores cached page images. Key: composite string {userId}_{patentNumber}_{pageNumber}. Indexed by patent, cachedAt, and userId. Each record contains the image blob, width, height, patent number, user ID, and cache timestamp.
- meta — Stores per-patent metadata and settings. Key: string. Used for last-accessed timestamps, cache statistics, and the settings object itself.
Sign-In Flow
On failure: User-friendly error messages are displayed:
Session Expiry and Re-Authentication
When the session expires and auto-refresh fails, the Session Expired dialog appears — a full-screen modal overlay (85% opacity black background) with a lock icon, "Session Expired" heading, and inline login form. This dialog:
- Blocks all interaction with the page behind it
- Has inline Username/Password fields and a Sign In button
- Handles the NEW_PASSWORD_REQUIRED challenge if it occurs during re-auth
- On successful re-authentication, reinitializes AWS clients, re-establishes the encryption session (using the entered password), restarts credential checking, and restarts cross-tab sync system monitoring
- Shows a success notification: "Signed in successfully — you can continue working"
The key design principle is seamless continuation: after re-authentication, the user returns to exactly where they were. No page reload is required, and no work is lost.
Session Indicator
A floating indicator appears in the bottom-right corner of every page. It is hidden when the session is healthy (more than 15 minutes remaining). When time runs low:
- Less than 15 minutes: Orange background with timer icon showing remaining time (e.g., "⏱️ Session: 14m")
- Less than 5 minutes: Orange background with "🔄 Refreshing session..."
- Expired: Red background with "⚠️ Session expired — Click to sign in"
Clicking the indicator opens a Session Status popup (centered modal) showing:
- Current status with color-coded icon (green ✅, orange ⏱️, or red ⚠️)
- Expiry timestamp
- "Sessions auto-refresh before expiry" note
- Buttons: Refresh Now (or Sign In if expired), Sign Out, Close
Password Change
authentication system.changePasswordUnified() handles changing both the authentication service password and the encryption key wrapping in a single operation. The flow:
- Call cognito.changePassword() with the Access token, current password, and new password
- If an encryption session is active, call encryptionSession.changePassword() to re-wrap the master key under the new password (see Section B.5)
- Broadcast PASSWORD_CHANGED to other tabs via cross-tab sync system
Sign Out
The sign-out process (triggered from the Account popup or Session Status popup) performs a thorough cleanup:
- Sets window.signingOut = true (prevents the beforeunload unsaved-changes dialog from interfering)
- Clears the encryption key cache from local storage (encryption system.clearCache())
- Stops the credential check interval and refresh timer
- Wipes all local storage data (storage system.clearAllData() then storage system.deleteDatabase())
- Reloads the page (returning to the sign-in screen)
For multi-tab sign-out, cross-tab sync system coordinates a save-before-signout workflow (see Section D.5).
Password Mismatch Recovery
A PasswordMismatchError is thrown when authentication service authentication succeeds (the login password is correct) but encryption unlock fails (the encryption password doesn't match). This can happen if the authentication service password was reset externally (e.g., by an admin) without updating the encryption wrapping.
When this occurs, a recovery dialog appears with three options:
- Enter your PREVIOUS password: Unlocks encryption with the old password. The wrapped key is then usable, and the encryption key is cached. (The mismatch is now resolved for the session, though the wrapping still uses the old password's derived key.)
- Reset Encryption (Loses Cloud Notes): Deletes the encryption key record from cloud database and the encryption key cache, then prompts for the current password to create a fresh encryption setup. All previously encrypted cloud data becomes permanently unrecoverable.
- Cancel: Dismisses the dialog; cloud storage operations will be unavailable until encryption is resolved.
The reset option requires two confirmation dialogs as a safeguard against accidental data loss.
File-Open Conflict Detection
When a user tries to open a file that's already open in another tab, a conflict dialog warns them.
Tracking: Each tab maintains a currentFile object ({type, fileKey, name, s3Key, patentNumber, chartId, openedAt}). When a file is opened, setCurrentFile() is called and FILE_OPENED is broadcast. When the tab closes or the file changes, FILE_CLOSED is broadcast.
File key generation: cross-tab sync system.generateFileKey(fileInfo) creates a unique identifier based on file type:
- Notes with cloud storage key: note:{s3Key}
- Patents by number: patent:{patentNumber}
- Charts with cloud storage key: claimchart:{s3Key}
- Charts with chart ID: claimchart:{chartId}
- Fallback: {type}:{name}
Query flow: isFileOpenInAnotherTab(fileInfo):
- First checks the current tab (returns immediately if match, with isCurrentTab: true)
- Broadcasts FILE_QUERY with the file key
- Waits 300ms for FILE_QUERY_RESPONSE messages from other tabs
- Each responding tab that has the file open sends back its tab ID, file name, and opened time
Conflict dialog: If the file is already open, a dialog appears with:
- "File Already Open" heading with warning icon
- The file name and which tab(s) have it open (e.g., "another tab" or "2 other tabs" or "this tab")
- Warning text about potential save conflicts (or reload warning for same-tab)
- Buttons: Cancel, Show Me Which Tab (if open in exactly one other tab — triggers favicon flashing), Open Anyway (or Reload for same-tab)
Keyboard Shortcuts Reference
## Global Shortcuts
| Shortcut | Action |
|---|---|
| F6 | Focus the menu bar (jumps to Open/Save button) |
| Ctrl+S | Quick save |
| Ctrl+G | Go to page dialog |
| Ctrl+Z | Undo last selection operation |
| Ctrl+Y | Redo selection operation |
| Ctrl+Shift+Z | Redo selection operation (alternate) |
| Ctrl+C | Copy all selected text (when selections exist and no text input is focused) |
| Ctrl+P / Cmd+P | Open Print to PDF dialog (intercepts browser print) |
| Ctrl+Shift+D | Toggle search debug mode (console output) |
| Ctrl+Shift+V | Show version manager |
| Alt+S | Activate drag-to-search mode |
| Alt+O | Rotate current page 90° |
| Alt+R | Rotate current page 90° (alternate) |
| Alt+, (comma) | Previous search result |
| Alt+. (period) | Next search result |
| Escape | Close dialog / exit screenshot mode / exit reading mode / close popup |
## Sidebar Navigation
| Shortcut | Action |
|---|---|
| Tab | Next sidebar button (wraps from Account → Open/Save) |
| Shift+Tab | Previous sidebar button (wraps from Open/Save → Account) |
| Enter / Space | Activate focused button |
## Search Result Navigation
| Shortcut | Action |
|---|---|
| , (comma) | Previous search result |
| . (period) | Next search result |
## Highlight Tool Keyboard Modes
Text Selection Mode
| Shortcut | Action |
|---|---|
| Arrow Left/Right (A/D, J/L) | Move cursor to previous/next word |
| Arrow Up/Down (W/S, I/K) | Move cursor to line above/below |
| Shift+Left/Right | Jump between left and right columns |
| Enter | Set anchor (start selection) / Confirm selection |
| Escape | Cancel and return to pencil button |
Selection Navigation Mode
| Shortcut | Action |
|---|---|
| Tab | Next selection |
| Shift+Tab | Previous selection |
| Enter / Space | Open selection's hover tooltip |
| Escape | Exit to pencil button |
Selection Hover Tooltip
| Shortcut | Action |
|---|---|
| Tab / Arrow Right | Next button |
| Shift+Tab / Arrow Left | Previous button |
| Enter / Space | Activate button |
| Past last button → Tab | Enter "Edit End" boundary mode |
| Before first button → Shift+Tab | Enter "Edit Start" boundary mode |
| Escape | Close tooltip |
Boundary Editing Mode
| Shortcut | Action |
|---|---|
| Arrow keys | Move boundary word-by-word |
| Enter | Confirm new boundary |
| Tab | Save and move to next action |
| Escape | Cancel (revert to original boundary) |
## Reading Mode
| Shortcut | Action |
|---|---|
| Arrow Down / S / K | Next line |
| Arrow Up / W / I | Previous line |
| Arrow Left / A / J | Switch to left column |
| Arrow Right / D / L | Switch to right column |
| Space | Repeat current line |
| Enter | Convert to keyboard text selection mode |
| Escape | Exit reading mode |
## Screenshot Frame Navigation (Keyboard)
| Shortcut | Action |
|---|---|
| Arrow keys / WASD / IJKL | Move frame (10px steps) |
| Tab | Cycle to next resize handle or next frame |
| Shift+Tab | Cycle to previous |
| Arrow keys (on resize handle) | Resize edge (10px, Shift for 1px) |
| Escape | Exit to screenshot button |
## Annotation Popup Keyboard
| Shortcut | Action |
|---|---|
| Arrow keys / WASD / IJKL | Move popup (10px, Shift for 1px) |
| Tab | Cycle through: resize handles → editor → buttons → toolbar |
| Escape | Exit popup |