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 —
  • test_clock_renders_local_time function

cjm_session_scratchpad_qt.watcher

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

Dependencies

Depends on: PySide6, cjm-substrate-qt-kit

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cjm_session_scratchpad_qt-0.0.1.tar.gz (46.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cjm_session_scratchpad_qt-0.0.1-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file cjm_session_scratchpad_qt-0.0.1.tar.gz.

File metadata

File hashes

Hashes for cjm_session_scratchpad_qt-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1a7ee1a4e39bcc67b7572c90e03cf3b101572672c1ea74085ee19bade9126c93
MD5 6da24cbf144fb377c0e092ac554ed591
BLAKE2b-256 12f483214bceb2b64ba884ef0a5bbf78f925d0b7ad5caac0f549066cc4edb3c5

See more details on using hashes here.

File details

Details for the file cjm_session_scratchpad_qt-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cjm_session_scratchpad_qt-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0be64597102ce61e1b51cfa5f0dadec6d514c60d7d8d98e2445eb0f257ce80c6
MD5 2a86b518e09d5c584f104746ef24b782
BLAKE2b-256 47b6b73edfdc381d2ec12e70c082acf2073a559adaad00e1caaacd497a1b63d4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.2

2 files

This release

0.0.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page