Skip to main content

cjm-session-scratchpad-qt

The session scratchpad — composition seat v0 of the seat family (DECs 2a062aff + ea85eab7). A model-agnostic Qt surface for composing LLM session messages in markdown: session-key file naming from .cjm/current-session (kills the copy-previous + rename rituals), a one-key edit/rendered toggle held position-stable in both directions by per-block source-line anchors in the owned markdown->HTML pipeline, autosave-only persistence (debounced idle + toggle/focus-loss/close, atomic writes, watcher guard — no dialogs), and wrap-selection formatting verbs on the KeymapRegistry lane. Designed for accretion: live-session feature filings land on-graph and build in later sittings.

Modules

  • cjm_session_scratchpad_qt.__init__ — Session scratchpad — composition seat v0 (DEC 2a062aff + ea85eab7). Model-agnostic by design: any LLM session's message composition surface.
  • cjm_session_scratchpad_qt.app — The scratchpad shell: composition seat v0 (DECs 2a062aff + ea85eab7).
  • cjm_session_scratchpad_qt.appv2 — The graph-rung scratchpad shell: composition seat v2 (DEC 6e76c120).
  • cjm_session_scratchpad_qt.cli — CLI entry for the session scratchpad (console script cjm-session-scratchpad-qt).
  • cjm_session_scratchpad_qt.files — Session-aware file resolution (DEC ea85eab7 pts 1-2).
  • cjm_session_scratchpad_qt.graph — One open graph behind the scratchpad — the workbench GraphSession pattern
  • cjm_session_scratchpad_qt.manifest — Pending-send manifests + pull-time reconciliation (DEC fc6a0cdc pt 5).
  • cjm_session_scratchpad_qt.render — The owned markdown -> HTML pipeline (DEC ea85eab7 pt 4).
  • cjm_session_scratchpad_qt.textops — Wrap-selection formatting operators (scope DEC 2a062aff pt 4) + the v2
  • cjm_session_scratchpad_qt.timeline — Interleaved timeline derivation — the pure half of the v2 reading view.
  • cjm_session_scratchpad_qt.timeline_html — Timeline HTML assembly — the pure presentation half of the v2 reading view.
  • cjm_session_scratchpad_qt.watcher — Transcript-dir change detection — the sleep-first mtime poll's pure half.

API

cjm_session_scratchpad_qt.app

  • Editor class — The source pane, with line-addressed viewport access for the toggle.
  • ScratchpadWindow class — One session file behind an edit/rendered toggle.
  • block_line_map function — Scan a rendered document for the renderer's Lxx anchors:
  • mono_family function — The rendered code font: the theme's mono token, else the system

cjm_session_scratchpad_qt.appv2

  • GraphScratchpadWindow class — One session spine behind a timeline + part-composer.
  • LanguageBar class — The fence-language mini-bar: a completer-backed field; Enter applies,
  • SessionPickerDialog class — The open-session gesture's chooser: filterable Session list, newest

cjm_session_scratchpad_qt.cli

  • build_parser function
  • main function

cjm_session_scratchpad_qt.files

  • Target class
  • atomic_write function — temp + rename in the target dir: a mid-session agent read never sees
  • ensure_file function — Create the file blank if missing (sessions are born blank now);
  • find_session_key function — Walk up from start for the nearest .cjm/current-session pointer.
  • find_session_root function — The nearest pointer AND the project directory that owns it:
  • most_recent function — Newest markdown file by mtime (the absent-pointer fallback).
  • parse_key_time function — A session key is its mint timestamp; None for legacy/free-form names.
  • resolve_target function — The launch contract: explicit path wins; otherwise the session

cjm_session_scratchpad_qt.graph

  • ScratchpadSession class — Sync facade over the projection layer for ONE session's scratchpad:
  • default_transcript_dir function — The harness transcript dir for a project: ~/.claude/projects/<slug>,
  • part_payload function — A composer part's mint/journal payload: composer-minted uuid (the

cjm_session_scratchpad_qt.manifest

  • PendingSend class — One recorded compose-send awaiting its transcript echo.
  • compose_text function — The outgoing message: parts joined as paragraphs, outer whitespace trimmed.
  • load_pending function — Read manifests; a missing or unreadable sidecar is an empty list.
  • manifest_path function — The session's pending-send sidecar.
  • reconcile function — Match manifests against pulled user messages by EXACT text.
  • save_pending function — Persist manifests atomically (temp + rename; a concurrent read never

cjm_session_scratchpad_qt.render

  • RenderResult class
  • nearest_anchor function — The anchor line for a source position: greatest anchor <= line
  • render_html function — Render markdown to QTextBrowser-ready HTML with per-block source-line

cjm_session_scratchpad_qt.textops

  • WrapResult class
  • fence_selection function — Toggle a code fence around the selected lines. An already-fenced block
  • toggle_list function — Toggle list markers on the selected lines: strip when every non-blank
  • wrap_selection function — Toggle marker around [start, end) of document.

cjm_session_scratchpad_qt.timeline

  • TimelineEntry class — One timeline row, presentation-ready.
  • build_timeline function — Derive the interleaved timeline: active-path status + birth-class flags,
  • timeline_blocks function — Group consecutive off-path entries for the superseded-branch chip:

cjm_session_scratchpad_qt.timeline_html

  • build_timeline_html function — The whole timeline document: cards separated by rules, consecutive
  • card_html function — One message card: anchored header line (identity + affordances) +
  • lane_filter function — The lane views: composition = composer-born, transcript = pulled.
  • linkify_ids function — Wrap full node/source ids appearing as text in jump:// links —

cjm_session_scratchpad_qt.watcher

  • DirWatch class — Cheap (mtime, size) fingerprint over a transcript dir's *.jsonl.

Dependencies

Depends on: PySide6, cjm-context-graph-layer, cjm-context-graph-primitives, cjm-context-graph-projection, cjm-substrate-qt-kit

Metadata

Release files for cjm-session-scratchpad-qt 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cjm-session-scratchpad-qt 0.0.6
File Size Uploaded
cjm_session_scratchpad_qt-0.0.6.tar.gz 47.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cjm-session-scratchpad-qt 0.0.6
File Interpreter ABI Platform
cjm_session_scratchpad_qt-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 89.2 kB

Release files / cjm_session_scratchpad_qt-0.0.6.tar.gz

Download URL cjm_session_scratchpad_qt-0.0.6.tar.gz
Size 47.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3b2dfac54c3c5f3e2006608b14592b5a3619079c789f08bb4e820d1b3c73eaca
BLAKE2b-256 checksum
How to use checksums
5ae7f7f7e982065117a4d0b945957f31d5352f42e57c9cfb2397c50de1cd6bd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / cjm_session_scratchpad_qt-0.0.6-py3-none-any.whl

Download URL cjm_session_scratchpad_qt-0.0.6-py3-none-any.whl
Size 41.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2adf4c8b437f75bfe744b847667977c59aa9d2b8afa599a99b2233ffe707365
BLAKE2b-256 checksum
How to use checksums
a2f9bc9df2d9f1dc9b63901cdf39bc4ed649c353ff12317db387b6a888e6658e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

0.0.8

2 release files

0.0.7

2 release files

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page