feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support - #737

Draft
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements
Draft

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support#737
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes#721

Session work column enhancements

Implementation of the 9-slice feature DAG for #721.

Dependency DAG (5 frontiers)

FrontierIssues
F0#722 (mode toggle), #724 (dropdown search), #725 (project file tree)
F1#723 (save infra), #726 (renderer dispatch)
F2#727 (PDF rendering), #728 (read-write text)
F3#729 (TeX compilation)
F4#730 (SyncTeX forward search)

Phase 1 (complete)

  • Added pdfjs-dist to opencode fork (v1.18.10-amicode.20)
  • Extracted buildCollapsedTree to shared utils/collapsed-tree.ts
  • Extracted ZoomControl to shared components/zoom-control.tsx
  • Re-extracted overlay

In progress

Walking the DAG frontier by frontier...

Picks up fork infrastructure for #721:
- pdfjs-dist@4.10.38 dependency (packages/app/package.json now in overlay)
- Shared buildCollapsedTree + filterCollapsedTree (utils/collapsed-tree.ts)
- Shared ZoomControl component + createZoomState hook (components/zoom-control.tsx)
- Also includes 31bf627498: suppress per-message Changed files section (#733)
@jeonghun-jj-leejeonghun-jj-lee added enhancement New feature or request area:ui labels Sep 2, 2026
@coderabbitai

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Add file-type-modes.ts: pure function mapping file extensions to available
view modes (.md → Diff|Raw|Preview, .tex/.bib/.tikz/.sty → same, other text
→ Diff|Raw, binary → Diff only)
- Add modeToggle + modeContent render props to SessionReviewFilePreviewV2
- Wire per-file-sticky mode state in ReviewPanelV2 (Map<file, mode>)
- SegmentedControlV2 toggle dispatches to correct content area
- Raw and Preview content slots render placeholders until F1 fills them
- Unit tests for file-type classification (12 tests)
Part of #721
- Add transient filter input at the top of the Files Changed file picker dropdown
- Filter narrows the tree by case-insensitive substring match on file path/name
- Filter clears when the dropdown closes (state local to the render prop IIFE)
- Uses filterCollapsedTree from the shared collapsed-tree module
- Autofocus on the input for instant typing
- Empty filter shows the full tree (no change from current behavior)
Part of #721
…#725)
- Add previewable-files.ts: PreviewFileEntry type (extended beyond .md),
PREVIEWABLE_EXTENSIONS constant, isPreviewable() function (unit tests: 7)
- Extend WorkspaceProjectEntry with previewableFiles field (both extension
and app-side types)
- Add scanPreviewableFiles() to extension workspace_projects.ts —
recursive directory scan filtered to previewable types
- Update SessionPreviewTab to accept projectFiles/projectRoot props
- Conditional data source: project files when project loaded, session-touched
.md files when no project (current behavior preserved)
- Add error state: 'Could not load file' inline message on load failure
- Update PreviewFileList: project-source files show no change badge
Part of #721
…ent (#723)
- Migrate save indicator from ad-hoc Tailwind (text-green-500/text-text-weak)
to var(--status-running) / var(--status-done) design tokens
- Add onFileSaved callback prop: fires after POST /file/write completes
(path + success boolean) — hook for #729 TeX auto-compile
- Add onDiffRefreshNeeded callback: fires after save to signal the parent
that diff data should be re-fetched
- Zoom widget extraction was completed in Phase 1 (components/zoom-control.tsx)
Part of #721
- Add renderer-dispatch.ts: getRendererKind() maps extensions to renderer
kinds (markdown, source, image, pdf, unknown)
- getShikiLanguage(): .tex/.tikz/.sty → latex grammar, .bib → bibtex
- hasSourcePreviewToggle(): source files get Raw | Preview toggle
- resolveMainPdf(): convention-based PDF resolution (basename.pdf adjacent)
- Wire renderer dispatch into Files Changed Preview content slot
- Unit tests for dispatch, language mapping, PDF resolution (15 tests)
Part of #721
- Add PDFViewer component: canvas-per-page rendering in scrollable container
- pdfjs-dist worker configured via ?url import (same pattern as shiki worker)
- Zoom support via CSS scale transform (matches markdown preview behavior)
- Scroll-position preservation on reload: saves scrollTop before reload,
restores after DOM update via requestAnimationFrame
- Reactive version prop: incrementing triggers reload (contract for #729
TeX compilation hot-reload)
- Loading state ('Loading PDF...') while parsing
- Error state ('Could not load PDF') on failure
- Load cancellation: new request destroys in-flight task
Part of #721
- Add RawFileEditor shared component: textarea with auto-save (debounced 1s
+ Cmd+S), save indicator using design tokens, file-type-agnostic
- Save indicator uses var(--status-running) for 'Saving...' and
var(--status-done) for 'Saved'
- Prevents global command system from stealing Cmd+A/Z/Shift+Z
- onSaved callback for downstream consumers (#729 TeX auto-compile)
- Zoom support via proportional font-size scaling
Part of #721
…729)
Extension side:
- Add tex_support.ts: detectTex() checks PATH for latexmk/pdflatex/xelatex/lualatex
- parseLatexConfig(): reads research-project.toml [latex] section (main, engine,
outdir, auto_compile) — simple TOML parser, no dependency
- resolveEngine(): selection chain (toml > .latexmkrc > latexmk default > first
available engine)
- discoverMainFile(): discovery chain (toml > auto-detect \documentclass > undefined
if ambiguous)
- enrichProjectEntries(): populates previewableFiles + tex capability per project
Bridge extension:
- WorkspaceProjectEntry gains tex?: { available, engine, mainFile? } field
- App-side WorkspaceProject type extended to match
Tests: 8 new tests for TOML parsing, main file discovery, ambiguity handling
Note: The app-side compile UI (Build button, auto-compile, error banner) is
infrastructure-ready but the UI components are placeholder — the compile
command execution and IPC are deferred to the wiring pass.
Part of #721
- Add synctex.ts: parser for .synctex.gz files (gzipped SyncTeX v1 format)
- parseSyncTexFile(): reads and decompresses .synctex.gz, returns SyncTexIndex
- parseSyncTexContent(): parses Input records (tag→filename) and page records
(v/h nodes with tag, line, x, y coordinates)
- forwardSearch(): maps (source file, cursor line) → (page, x, y) position
in the PDF. Matches by full path, suffix, or basename fallback. Finds the
closest line when no exact match exists.
- Graceful degradation: all functions return undefined on any failure (missing
file, corrupt data, parse error) — the PDF viewer opens at its current
position, never crashes.
- Unit tests: 10 tests against a minimal SyncTeX fixture
Part of #721
…lders
- Raw mode: loads file via SDK, renders RawFileEditor with auto-save
- Preview mode for .md: loads file via SDK, renders <Markdown>
- Add structural test: no placeholder strings, imports RawFileEditor + Markdown
- Other preview types: honest 'not yet available' message (source/PDF next)
- Mode toggle (Diff/Raw/Preview) now in the toolbar header, right of the
arrows and left of the unified/split toggle
- Icons: unified (+/-) for Diff, edit (pencil) for Raw, eye for Preview
- Tooltips on hover
- Add toolbarExtra prop to SessionReviewV2Props
- Fix Icon import: v2/icon (has 'unified') instead of v1 icon
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uienhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support

1 participant

@jeonghun-jj-lee
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support - #737

Draft
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements
Draft

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support#737
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes#721

Session work column enhancements

Implementation of the 9-slice feature DAG for #721.

Dependency DAG (5 frontiers)

FrontierIssues
F0#722 (mode toggle), #724 (dropdown search), #725 (project file tree)
F1#723 (save infra), #726 (renderer dispatch)
F2#727 (PDF rendering), #728 (read-write text)
F3#729 (TeX compilation)
F4#730 (SyncTeX forward search)

Phase 1 (complete)

  • Added pdfjs-dist to opencode fork (v1.18.10-amicode.20)
  • Extracted buildCollapsedTree to shared utils/collapsed-tree.ts
  • Extracted ZoomControl to shared components/zoom-control.tsx
  • Re-extracted overlay

In progress

Walking the DAG frontier by frontier...

Picks up fork infrastructure for #721:
- pdfjs-dist@4.10.38 dependency (packages/app/package.json now in overlay)
- Shared buildCollapsedTree + filterCollapsedTree (utils/collapsed-tree.ts)
- Shared ZoomControl component + createZoomState hook (components/zoom-control.tsx)
- Also includes 31bf627498: suppress per-message Changed files section (#733)
@jeonghun-jj-leejeonghun-jj-lee added enhancement New feature or request area:ui labels Sep 2, 2026
@coderabbitai

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Add file-type-modes.ts: pure function mapping file extensions to available
view modes (.md → Diff|Raw|Preview, .tex/.bib/.tikz/.sty → same, other text
→ Diff|Raw, binary → Diff only)
- Add modeToggle + modeContent render props to SessionReviewFilePreviewV2
- Wire per-file-sticky mode state in ReviewPanelV2 (Map<file, mode>)
- SegmentedControlV2 toggle dispatches to correct content area
- Raw and Preview content slots render placeholders until F1 fills them
- Unit tests for file-type classification (12 tests)
Part of #721
- Add transient filter input at the top of the Files Changed file picker dropdown
- Filter narrows the tree by case-insensitive substring match on file path/name
- Filter clears when the dropdown closes (state local to the render prop IIFE)
- Uses filterCollapsedTree from the shared collapsed-tree module
- Autofocus on the input for instant typing
- Empty filter shows the full tree (no change from current behavior)
Part of #721
…#725)
- Add previewable-files.ts: PreviewFileEntry type (extended beyond .md),
PREVIEWABLE_EXTENSIONS constant, isPreviewable() function (unit tests: 7)
- Extend WorkspaceProjectEntry with previewableFiles field (both extension
and app-side types)
- Add scanPreviewableFiles() to extension workspace_projects.ts —
recursive directory scan filtered to previewable types
- Update SessionPreviewTab to accept projectFiles/projectRoot props
- Conditional data source: project files when project loaded, session-touched
.md files when no project (current behavior preserved)
- Add error state: 'Could not load file' inline message on load failure
- Update PreviewFileList: project-source files show no change badge
Part of #721
…ent (#723)
- Migrate save indicator from ad-hoc Tailwind (text-green-500/text-text-weak)
to var(--status-running) / var(--status-done) design tokens
- Add onFileSaved callback prop: fires after POST /file/write completes
(path + success boolean) — hook for #729 TeX auto-compile
- Add onDiffRefreshNeeded callback: fires after save to signal the parent
that diff data should be re-fetched
- Zoom widget extraction was completed in Phase 1 (components/zoom-control.tsx)
Part of #721
- Add renderer-dispatch.ts: getRendererKind() maps extensions to renderer
kinds (markdown, source, image, pdf, unknown)
- getShikiLanguage(): .tex/.tikz/.sty → latex grammar, .bib → bibtex
- hasSourcePreviewToggle(): source files get Raw | Preview toggle
- resolveMainPdf(): convention-based PDF resolution (basename.pdf adjacent)
- Wire renderer dispatch into Files Changed Preview content slot
- Unit tests for dispatch, language mapping, PDF resolution (15 tests)
Part of #721
- Add PDFViewer component: canvas-per-page rendering in scrollable container
- pdfjs-dist worker configured via ?url import (same pattern as shiki worker)
- Zoom support via CSS scale transform (matches markdown preview behavior)
- Scroll-position preservation on reload: saves scrollTop before reload,
restores after DOM update via requestAnimationFrame
- Reactive version prop: incrementing triggers reload (contract for #729
TeX compilation hot-reload)
- Loading state ('Loading PDF...') while parsing
- Error state ('Could not load PDF') on failure
- Load cancellation: new request destroys in-flight task
Part of #721
- Add RawFileEditor shared component: textarea with auto-save (debounced 1s
+ Cmd+S), save indicator using design tokens, file-type-agnostic
- Save indicator uses var(--status-running) for 'Saving...' and
var(--status-done) for 'Saved'
- Prevents global command system from stealing Cmd+A/Z/Shift+Z
- onSaved callback for downstream consumers (#729 TeX auto-compile)
- Zoom support via proportional font-size scaling
Part of #721
…729)
Extension side:
- Add tex_support.ts: detectTex() checks PATH for latexmk/pdflatex/xelatex/lualatex
- parseLatexConfig(): reads research-project.toml [latex] section (main, engine,
outdir, auto_compile) — simple TOML parser, no dependency
- resolveEngine(): selection chain (toml > .latexmkrc > latexmk default > first
available engine)
- discoverMainFile(): discovery chain (toml > auto-detect \documentclass > undefined
if ambiguous)
- enrichProjectEntries(): populates previewableFiles + tex capability per project
Bridge extension:
- WorkspaceProjectEntry gains tex?: { available, engine, mainFile? } field
- App-side WorkspaceProject type extended to match
Tests: 8 new tests for TOML parsing, main file discovery, ambiguity handling
Note: The app-side compile UI (Build button, auto-compile, error banner) is
infrastructure-ready but the UI components are placeholder — the compile
command execution and IPC are deferred to the wiring pass.
Part of #721
- Add synctex.ts: parser for .synctex.gz files (gzipped SyncTeX v1 format)
- parseSyncTexFile(): reads and decompresses .synctex.gz, returns SyncTexIndex
- parseSyncTexContent(): parses Input records (tag→filename) and page records
(v/h nodes with tag, line, x, y coordinates)
- forwardSearch(): maps (source file, cursor line) → (page, x, y) position
in the PDF. Matches by full path, suffix, or basename fallback. Finds the
closest line when no exact match exists.
- Graceful degradation: all functions return undefined on any failure (missing
file, corrupt data, parse error) — the PDF viewer opens at its current
position, never crashes.
- Unit tests: 10 tests against a minimal SyncTeX fixture
Part of #721
…lders
- Raw mode: loads file via SDK, renders RawFileEditor with auto-save
- Preview mode for .md: loads file via SDK, renders <Markdown>
- Add structural test: no placeholder strings, imports RawFileEditor + Markdown
- Other preview types: honest 'not yet available' message (source/PDF next)
- Mode toggle (Diff/Raw/Preview) now in the toolbar header, right of the
arrows and left of the unified/split toggle
- Icons: unified (+/-) for Diff, edit (pencil) for Raw, eye for Preview
- Tooltips on hover
- Add toolbarExtra prop to SessionReviewV2Props
- Fix Icon import: v2/icon (has 'unified') instead of v1 icon
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uienhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support

1 participant

@jeonghun-jj-lee
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support - #737

Draft
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements
Draft

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support#737
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes#721

Session work column enhancements

Implementation of the 9-slice feature DAG for #721.

Dependency DAG (5 frontiers)

FrontierIssues
F0#722 (mode toggle), #724 (dropdown search), #725 (project file tree)
F1#723 (save infra), #726 (renderer dispatch)
F2#727 (PDF rendering), #728 (read-write text)
F3#729 (TeX compilation)
F4#730 (SyncTeX forward search)

Phase 1 (complete)

  • Added pdfjs-dist to opencode fork (v1.18.10-amicode.20)
  • Extracted buildCollapsedTree to shared utils/collapsed-tree.ts
  • Extracted ZoomControl to shared components/zoom-control.tsx
  • Re-extracted overlay

In progress

Walking the DAG frontier by frontier...

Picks up fork infrastructure for #721:
- pdfjs-dist@4.10.38 dependency (packages/app/package.json now in overlay)
- Shared buildCollapsedTree + filterCollapsedTree (utils/collapsed-tree.ts)
- Shared ZoomControl component + createZoomState hook (components/zoom-control.tsx)
- Also includes 31bf627498: suppress per-message Changed files section (#733)
@jeonghun-jj-leejeonghun-jj-lee added enhancement New feature or request area:ui labels Sep 2, 2026
@coderabbitai

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Add file-type-modes.ts: pure function mapping file extensions to available
view modes (.md → Diff|Raw|Preview, .tex/.bib/.tikz/.sty → same, other text
→ Diff|Raw, binary → Diff only)
- Add modeToggle + modeContent render props to SessionReviewFilePreviewV2
- Wire per-file-sticky mode state in ReviewPanelV2 (Map<file, mode>)
- SegmentedControlV2 toggle dispatches to correct content area
- Raw and Preview content slots render placeholders until F1 fills them
- Unit tests for file-type classification (12 tests)
Part of #721
- Add transient filter input at the top of the Files Changed file picker dropdown
- Filter narrows the tree by case-insensitive substring match on file path/name
- Filter clears when the dropdown closes (state local to the render prop IIFE)
- Uses filterCollapsedTree from the shared collapsed-tree module
- Autofocus on the input for instant typing
- Empty filter shows the full tree (no change from current behavior)
Part of #721
…#725)
- Add previewable-files.ts: PreviewFileEntry type (extended beyond .md),
PREVIEWABLE_EXTENSIONS constant, isPreviewable() function (unit tests: 7)
- Extend WorkspaceProjectEntry with previewableFiles field (both extension
and app-side types)
- Add scanPreviewableFiles() to extension workspace_projects.ts —
recursive directory scan filtered to previewable types
- Update SessionPreviewTab to accept projectFiles/projectRoot props
- Conditional data source: project files when project loaded, session-touched
.md files when no project (current behavior preserved)
- Add error state: 'Could not load file' inline message on load failure
- Update PreviewFileList: project-source files show no change badge
Part of #721
…ent (#723)
- Migrate save indicator from ad-hoc Tailwind (text-green-500/text-text-weak)
to var(--status-running) / var(--status-done) design tokens
- Add onFileSaved callback prop: fires after POST /file/write completes
(path + success boolean) — hook for #729 TeX auto-compile
- Add onDiffRefreshNeeded callback: fires after save to signal the parent
that diff data should be re-fetched
- Zoom widget extraction was completed in Phase 1 (components/zoom-control.tsx)
Part of #721
- Add renderer-dispatch.ts: getRendererKind() maps extensions to renderer
kinds (markdown, source, image, pdf, unknown)
- getShikiLanguage(): .tex/.tikz/.sty → latex grammar, .bib → bibtex
- hasSourcePreviewToggle(): source files get Raw | Preview toggle
- resolveMainPdf(): convention-based PDF resolution (basename.pdf adjacent)
- Wire renderer dispatch into Files Changed Preview content slot
- Unit tests for dispatch, language mapping, PDF resolution (15 tests)
Part of #721
- Add PDFViewer component: canvas-per-page rendering in scrollable container
- pdfjs-dist worker configured via ?url import (same pattern as shiki worker)
- Zoom support via CSS scale transform (matches markdown preview behavior)
- Scroll-position preservation on reload: saves scrollTop before reload,
restores after DOM update via requestAnimationFrame
- Reactive version prop: incrementing triggers reload (contract for #729
TeX compilation hot-reload)
- Loading state ('Loading PDF...') while parsing
- Error state ('Could not load PDF') on failure
- Load cancellation: new request destroys in-flight task
Part of #721
- Add RawFileEditor shared component: textarea with auto-save (debounced 1s
+ Cmd+S), save indicator using design tokens, file-type-agnostic
- Save indicator uses var(--status-running) for 'Saving...' and
var(--status-done) for 'Saved'
- Prevents global command system from stealing Cmd+A/Z/Shift+Z
- onSaved callback for downstream consumers (#729 TeX auto-compile)
- Zoom support via proportional font-size scaling
Part of #721
…729)
Extension side:
- Add tex_support.ts: detectTex() checks PATH for latexmk/pdflatex/xelatex/lualatex
- parseLatexConfig(): reads research-project.toml [latex] section (main, engine,
outdir, auto_compile) — simple TOML parser, no dependency
- resolveEngine(): selection chain (toml > .latexmkrc > latexmk default > first
available engine)
- discoverMainFile(): discovery chain (toml > auto-detect \documentclass > undefined
if ambiguous)
- enrichProjectEntries(): populates previewableFiles + tex capability per project
Bridge extension:
- WorkspaceProjectEntry gains tex?: { available, engine, mainFile? } field
- App-side WorkspaceProject type extended to match
Tests: 8 new tests for TOML parsing, main file discovery, ambiguity handling
Note: The app-side compile UI (Build button, auto-compile, error banner) is
infrastructure-ready but the UI components are placeholder — the compile
command execution and IPC are deferred to the wiring pass.
Part of #721
- Add synctex.ts: parser for .synctex.gz files (gzipped SyncTeX v1 format)
- parseSyncTexFile(): reads and decompresses .synctex.gz, returns SyncTexIndex
- parseSyncTexContent(): parses Input records (tag→filename) and page records
(v/h nodes with tag, line, x, y coordinates)
- forwardSearch(): maps (source file, cursor line) → (page, x, y) position
in the PDF. Matches by full path, suffix, or basename fallback. Finds the
closest line when no exact match exists.
- Graceful degradation: all functions return undefined on any failure (missing
file, corrupt data, parse error) — the PDF viewer opens at its current
position, never crashes.
- Unit tests: 10 tests against a minimal SyncTeX fixture
Part of #721
…lders
- Raw mode: loads file via SDK, renders RawFileEditor with auto-save
- Preview mode for .md: loads file via SDK, renders <Markdown>
- Add structural test: no placeholder strings, imports RawFileEditor + Markdown
- Other preview types: honest 'not yet available' message (source/PDF next)
- Mode toggle (Diff/Raw/Preview) now in the toolbar header, right of the
arrows and left of the unified/split toggle
- Icons: unified (+/-) for Diff, edit (pencil) for Raw, eye for Preview
- Tooltips on hover
- Add toolbarExtra prop to SessionReviewV2Props
- Fix Icon import: v2/icon (has 'unified') instead of v1 icon
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uienhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support

1 participant

@jeonghun-jj-lee
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support - #737

Draft
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements
Draft

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support#737
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes#721

Session work column enhancements

Implementation of the 9-slice feature DAG for #721.

Dependency DAG (5 frontiers)

FrontierIssues
F0#722 (mode toggle), #724 (dropdown search), #725 (project file tree)
F1#723 (save infra), #726 (renderer dispatch)
F2#727 (PDF rendering), #728 (read-write text)
F3#729 (TeX compilation)
F4#730 (SyncTeX forward search)

Phase 1 (complete)

  • Added pdfjs-dist to opencode fork (v1.18.10-amicode.20)
  • Extracted buildCollapsedTree to shared utils/collapsed-tree.ts
  • Extracted ZoomControl to shared components/zoom-control.tsx
  • Re-extracted overlay

In progress

Walking the DAG frontier by frontier...

Picks up fork infrastructure for #721:
- pdfjs-dist@4.10.38 dependency (packages/app/package.json now in overlay)
- Shared buildCollapsedTree + filterCollapsedTree (utils/collapsed-tree.ts)
- Shared ZoomControl component + createZoomState hook (components/zoom-control.tsx)
- Also includes 31bf627498: suppress per-message Changed files section (#733)
@jeonghun-jj-leejeonghun-jj-lee added enhancement New feature or request area:ui labels Sep 2, 2026
@coderabbitai

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Add file-type-modes.ts: pure function mapping file extensions to available
view modes (.md → Diff|Raw|Preview, .tex/.bib/.tikz/.sty → same, other text
→ Diff|Raw, binary → Diff only)
- Add modeToggle + modeContent render props to SessionReviewFilePreviewV2
- Wire per-file-sticky mode state in ReviewPanelV2 (Map<file, mode>)
- SegmentedControlV2 toggle dispatches to correct content area
- Raw and Preview content slots render placeholders until F1 fills them
- Unit tests for file-type classification (12 tests)
Part of #721
- Add transient filter input at the top of the Files Changed file picker dropdown
- Filter narrows the tree by case-insensitive substring match on file path/name
- Filter clears when the dropdown closes (state local to the render prop IIFE)
- Uses filterCollapsedTree from the shared collapsed-tree module
- Autofocus on the input for instant typing
- Empty filter shows the full tree (no change from current behavior)
Part of #721
…#725)
- Add previewable-files.ts: PreviewFileEntry type (extended beyond .md),
PREVIEWABLE_EXTENSIONS constant, isPreviewable() function (unit tests: 7)
- Extend WorkspaceProjectEntry with previewableFiles field (both extension
and app-side types)
- Add scanPreviewableFiles() to extension workspace_projects.ts —
recursive directory scan filtered to previewable types
- Update SessionPreviewTab to accept projectFiles/projectRoot props
- Conditional data source: project files when project loaded, session-touched
.md files when no project (current behavior preserved)
- Add error state: 'Could not load file' inline message on load failure
- Update PreviewFileList: project-source files show no change badge
Part of #721
…ent (#723)
- Migrate save indicator from ad-hoc Tailwind (text-green-500/text-text-weak)
to var(--status-running) / var(--status-done) design tokens
- Add onFileSaved callback prop: fires after POST /file/write completes
(path + success boolean) — hook for #729 TeX auto-compile
- Add onDiffRefreshNeeded callback: fires after save to signal the parent
that diff data should be re-fetched
- Zoom widget extraction was completed in Phase 1 (components/zoom-control.tsx)
Part of #721
- Add renderer-dispatch.ts: getRendererKind() maps extensions to renderer
kinds (markdown, source, image, pdf, unknown)
- getShikiLanguage(): .tex/.tikz/.sty → latex grammar, .bib → bibtex
- hasSourcePreviewToggle(): source files get Raw | Preview toggle
- resolveMainPdf(): convention-based PDF resolution (basename.pdf adjacent)
- Wire renderer dispatch into Files Changed Preview content slot
- Unit tests for dispatch, language mapping, PDF resolution (15 tests)
Part of #721
- Add PDFViewer component: canvas-per-page rendering in scrollable container
- pdfjs-dist worker configured via ?url import (same pattern as shiki worker)
- Zoom support via CSS scale transform (matches markdown preview behavior)
- Scroll-position preservation on reload: saves scrollTop before reload,
restores after DOM update via requestAnimationFrame
- Reactive version prop: incrementing triggers reload (contract for #729
TeX compilation hot-reload)
- Loading state ('Loading PDF...') while parsing
- Error state ('Could not load PDF') on failure
- Load cancellation: new request destroys in-flight task
Part of #721
- Add RawFileEditor shared component: textarea with auto-save (debounced 1s
+ Cmd+S), save indicator using design tokens, file-type-agnostic
- Save indicator uses var(--status-running) for 'Saving...' and
var(--status-done) for 'Saved'
- Prevents global command system from stealing Cmd+A/Z/Shift+Z
- onSaved callback for downstream consumers (#729 TeX auto-compile)
- Zoom support via proportional font-size scaling
Part of #721
…729)
Extension side:
- Add tex_support.ts: detectTex() checks PATH for latexmk/pdflatex/xelatex/lualatex
- parseLatexConfig(): reads research-project.toml [latex] section (main, engine,
outdir, auto_compile) — simple TOML parser, no dependency
- resolveEngine(): selection chain (toml > .latexmkrc > latexmk default > first
available engine)
- discoverMainFile(): discovery chain (toml > auto-detect \documentclass > undefined
if ambiguous)
- enrichProjectEntries(): populates previewableFiles + tex capability per project
Bridge extension:
- WorkspaceProjectEntry gains tex?: { available, engine, mainFile? } field
- App-side WorkspaceProject type extended to match
Tests: 8 new tests for TOML parsing, main file discovery, ambiguity handling
Note: The app-side compile UI (Build button, auto-compile, error banner) is
infrastructure-ready but the UI components are placeholder — the compile
command execution and IPC are deferred to the wiring pass.
Part of #721
- Add synctex.ts: parser for .synctex.gz files (gzipped SyncTeX v1 format)
- parseSyncTexFile(): reads and decompresses .synctex.gz, returns SyncTexIndex
- parseSyncTexContent(): parses Input records (tag→filename) and page records
(v/h nodes with tag, line, x, y coordinates)
- forwardSearch(): maps (source file, cursor line) → (page, x, y) position
in the PDF. Matches by full path, suffix, or basename fallback. Finds the
closest line when no exact match exists.
- Graceful degradation: all functions return undefined on any failure (missing
file, corrupt data, parse error) — the PDF viewer opens at its current
position, never crashes.
- Unit tests: 10 tests against a minimal SyncTeX fixture
Part of #721
…lders
- Raw mode: loads file via SDK, renders RawFileEditor with auto-save
- Preview mode for .md: loads file via SDK, renders <Markdown>
- Add structural test: no placeholder strings, imports RawFileEditor + Markdown
- Other preview types: honest 'not yet available' message (source/PDF next)
- Mode toggle (Diff/Raw/Preview) now in the toolbar header, right of the
arrows and left of the unified/split toggle
- Icons: unified (+/-) for Diff, edit (pencil) for Raw, eye for Preview
- Tooltips on hover
- Add toolbarExtra prop to SessionReviewV2Props
- Fix Icon import: v2/icon (has 'unified') instead of v1 icon
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uienhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support

1 participant

@jeonghun-jj-lee
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support - #737

Draft
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements
Draft

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support#737
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes#721

Session work column enhancements

Implementation of the 9-slice feature DAG for #721.

Dependency DAG (5 frontiers)

FrontierIssues
F0#722 (mode toggle), #724 (dropdown search), #725 (project file tree)
F1#723 (save infra), #726 (renderer dispatch)
F2#727 (PDF rendering), #728 (read-write text)
F3#729 (TeX compilation)
F4#730 (SyncTeX forward search)

Phase 1 (complete)

  • Added pdfjs-dist to opencode fork (v1.18.10-amicode.20)
  • Extracted buildCollapsedTree to shared utils/collapsed-tree.ts
  • Extracted ZoomControl to shared components/zoom-control.tsx
  • Re-extracted overlay

In progress

Walking the DAG frontier by frontier...

Picks up fork infrastructure for #721:
- pdfjs-dist@4.10.38 dependency (packages/app/package.json now in overlay)
- Shared buildCollapsedTree + filterCollapsedTree (utils/collapsed-tree.ts)
- Shared ZoomControl component + createZoomState hook (components/zoom-control.tsx)
- Also includes 31bf627498: suppress per-message Changed files section (#733)
@jeonghun-jj-leejeonghun-jj-lee added enhancement New feature or request area:ui labels Sep 2, 2026
@coderabbitai

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Add file-type-modes.ts: pure function mapping file extensions to available
view modes (.md → Diff|Raw|Preview, .tex/.bib/.tikz/.sty → same, other text
→ Diff|Raw, binary → Diff only)
- Add modeToggle + modeContent render props to SessionReviewFilePreviewV2
- Wire per-file-sticky mode state in ReviewPanelV2 (Map<file, mode>)
- SegmentedControlV2 toggle dispatches to correct content area
- Raw and Preview content slots render placeholders until F1 fills them
- Unit tests for file-type classification (12 tests)
Part of #721
- Add transient filter input at the top of the Files Changed file picker dropdown
- Filter narrows the tree by case-insensitive substring match on file path/name
- Filter clears when the dropdown closes (state local to the render prop IIFE)
- Uses filterCollapsedTree from the shared collapsed-tree module
- Autofocus on the input for instant typing
- Empty filter shows the full tree (no change from current behavior)
Part of #721
…#725)
- Add previewable-files.ts: PreviewFileEntry type (extended beyond .md),
PREVIEWABLE_EXTENSIONS constant, isPreviewable() function (unit tests: 7)
- Extend WorkspaceProjectEntry with previewableFiles field (both extension
and app-side types)
- Add scanPreviewableFiles() to extension workspace_projects.ts —
recursive directory scan filtered to previewable types
- Update SessionPreviewTab to accept projectFiles/projectRoot props
- Conditional data source: project files when project loaded, session-touched
.md files when no project (current behavior preserved)
- Add error state: 'Could not load file' inline message on load failure
- Update PreviewFileList: project-source files show no change badge
Part of #721
…ent (#723)
- Migrate save indicator from ad-hoc Tailwind (text-green-500/text-text-weak)
to var(--status-running) / var(--status-done) design tokens
- Add onFileSaved callback prop: fires after POST /file/write completes
(path + success boolean) — hook for #729 TeX auto-compile
- Add onDiffRefreshNeeded callback: fires after save to signal the parent
that diff data should be re-fetched
- Zoom widget extraction was completed in Phase 1 (components/zoom-control.tsx)
Part of #721
- Add renderer-dispatch.ts: getRendererKind() maps extensions to renderer
kinds (markdown, source, image, pdf, unknown)
- getShikiLanguage(): .tex/.tikz/.sty → latex grammar, .bib → bibtex
- hasSourcePreviewToggle(): source files get Raw | Preview toggle
- resolveMainPdf(): convention-based PDF resolution (basename.pdf adjacent)
- Wire renderer dispatch into Files Changed Preview content slot
- Unit tests for dispatch, language mapping, PDF resolution (15 tests)
Part of #721
- Add PDFViewer component: canvas-per-page rendering in scrollable container
- pdfjs-dist worker configured via ?url import (same pattern as shiki worker)
- Zoom support via CSS scale transform (matches markdown preview behavior)
- Scroll-position preservation on reload: saves scrollTop before reload,
restores after DOM update via requestAnimationFrame
- Reactive version prop: incrementing triggers reload (contract for #729
TeX compilation hot-reload)
- Loading state ('Loading PDF...') while parsing
- Error state ('Could not load PDF') on failure
- Load cancellation: new request destroys in-flight task
Part of #721
- Add RawFileEditor shared component: textarea with auto-save (debounced 1s
+ Cmd+S), save indicator using design tokens, file-type-agnostic
- Save indicator uses var(--status-running) for 'Saving...' and
var(--status-done) for 'Saved'
- Prevents global command system from stealing Cmd+A/Z/Shift+Z
- onSaved callback for downstream consumers (#729 TeX auto-compile)
- Zoom support via proportional font-size scaling
Part of #721
…729)
Extension side:
- Add tex_support.ts: detectTex() checks PATH for latexmk/pdflatex/xelatex/lualatex
- parseLatexConfig(): reads research-project.toml [latex] section (main, engine,
outdir, auto_compile) — simple TOML parser, no dependency
- resolveEngine(): selection chain (toml > .latexmkrc > latexmk default > first
available engine)
- discoverMainFile(): discovery chain (toml > auto-detect \documentclass > undefined
if ambiguous)
- enrichProjectEntries(): populates previewableFiles + tex capability per project
Bridge extension:
- WorkspaceProjectEntry gains tex?: { available, engine, mainFile? } field
- App-side WorkspaceProject type extended to match
Tests: 8 new tests for TOML parsing, main file discovery, ambiguity handling
Note: The app-side compile UI (Build button, auto-compile, error banner) is
infrastructure-ready but the UI components are placeholder — the compile
command execution and IPC are deferred to the wiring pass.
Part of #721
- Add synctex.ts: parser for .synctex.gz files (gzipped SyncTeX v1 format)
- parseSyncTexFile(): reads and decompresses .synctex.gz, returns SyncTexIndex
- parseSyncTexContent(): parses Input records (tag→filename) and page records
(v/h nodes with tag, line, x, y coordinates)
- forwardSearch(): maps (source file, cursor line) → (page, x, y) position
in the PDF. Matches by full path, suffix, or basename fallback. Finds the
closest line when no exact match exists.
- Graceful degradation: all functions return undefined on any failure (missing
file, corrupt data, parse error) — the PDF viewer opens at its current
position, never crashes.
- Unit tests: 10 tests against a minimal SyncTeX fixture
Part of #721
…lders
- Raw mode: loads file via SDK, renders RawFileEditor with auto-save
- Preview mode for .md: loads file via SDK, renders <Markdown>
- Add structural test: no placeholder strings, imports RawFileEditor + Markdown
- Other preview types: honest 'not yet available' message (source/PDF next)
- Mode toggle (Diff/Raw/Preview) now in the toolbar header, right of the
arrows and left of the unified/split toggle
- Icons: unified (+/-) for Diff, edit (pencil) for Raw, eye for Preview
- Tooltips on hover
- Add toolbarExtra prop to SessionReviewV2Props
- Fix Icon import: v2/icon (has 'unified') instead of v1 icon
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uienhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support

1 participant

@jeonghun-jj-lee
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support - #737

Draft
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements
Draft

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support#737
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes#721

Session work column enhancements

Implementation of the 9-slice feature DAG for #721.

Dependency DAG (5 frontiers)

FrontierIssues
F0#722 (mode toggle), #724 (dropdown search), #725 (project file tree)
F1#723 (save infra), #726 (renderer dispatch)
F2#727 (PDF rendering), #728 (read-write text)
F3#729 (TeX compilation)
F4#730 (SyncTeX forward search)

Phase 1 (complete)

  • Added pdfjs-dist to opencode fork (v1.18.10-amicode.20)
  • Extracted buildCollapsedTree to shared utils/collapsed-tree.ts
  • Extracted ZoomControl to shared components/zoom-control.tsx
  • Re-extracted overlay

In progress

Walking the DAG frontier by frontier...

Picks up fork infrastructure for #721:
- pdfjs-dist@4.10.38 dependency (packages/app/package.json now in overlay)
- Shared buildCollapsedTree + filterCollapsedTree (utils/collapsed-tree.ts)
- Shared ZoomControl component + createZoomState hook (components/zoom-control.tsx)
- Also includes 31bf627498: suppress per-message Changed files section (#733)
@jeonghun-jj-leejeonghun-jj-lee added enhancement New feature or request area:ui labels Sep 2, 2026
@coderabbitai

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Add file-type-modes.ts: pure function mapping file extensions to available
view modes (.md → Diff|Raw|Preview, .tex/.bib/.tikz/.sty → same, other text
→ Diff|Raw, binary → Diff only)
- Add modeToggle + modeContent render props to SessionReviewFilePreviewV2
- Wire per-file-sticky mode state in ReviewPanelV2 (Map<file, mode>)
- SegmentedControlV2 toggle dispatches to correct content area
- Raw and Preview content slots render placeholders until F1 fills them
- Unit tests for file-type classification (12 tests)
Part of #721
- Add transient filter input at the top of the Files Changed file picker dropdown
- Filter narrows the tree by case-insensitive substring match on file path/name
- Filter clears when the dropdown closes (state local to the render prop IIFE)
- Uses filterCollapsedTree from the shared collapsed-tree module
- Autofocus on the input for instant typing
- Empty filter shows the full tree (no change from current behavior)
Part of #721
…#725)
- Add previewable-files.ts: PreviewFileEntry type (extended beyond .md),
PREVIEWABLE_EXTENSIONS constant, isPreviewable() function (unit tests: 7)
- Extend WorkspaceProjectEntry with previewableFiles field (both extension
and app-side types)
- Add scanPreviewableFiles() to extension workspace_projects.ts —
recursive directory scan filtered to previewable types
- Update SessionPreviewTab to accept projectFiles/projectRoot props
- Conditional data source: project files when project loaded, session-touched
.md files when no project (current behavior preserved)
- Add error state: 'Could not load file' inline message on load failure
- Update PreviewFileList: project-source files show no change badge
Part of #721
…ent (#723)
- Migrate save indicator from ad-hoc Tailwind (text-green-500/text-text-weak)
to var(--status-running) / var(--status-done) design tokens
- Add onFileSaved callback prop: fires after POST /file/write completes
(path + success boolean) — hook for #729 TeX auto-compile
- Add onDiffRefreshNeeded callback: fires after save to signal the parent
that diff data should be re-fetched
- Zoom widget extraction was completed in Phase 1 (components/zoom-control.tsx)
Part of #721
- Add renderer-dispatch.ts: getRendererKind() maps extensions to renderer
kinds (markdown, source, image, pdf, unknown)
- getShikiLanguage(): .tex/.tikz/.sty → latex grammar, .bib → bibtex
- hasSourcePreviewToggle(): source files get Raw | Preview toggle
- resolveMainPdf(): convention-based PDF resolution (basename.pdf adjacent)
- Wire renderer dispatch into Files Changed Preview content slot
- Unit tests for dispatch, language mapping, PDF resolution (15 tests)
Part of #721
- Add PDFViewer component: canvas-per-page rendering in scrollable container
- pdfjs-dist worker configured via ?url import (same pattern as shiki worker)
- Zoom support via CSS scale transform (matches markdown preview behavior)
- Scroll-position preservation on reload: saves scrollTop before reload,
restores after DOM update via requestAnimationFrame
- Reactive version prop: incrementing triggers reload (contract for #729
TeX compilation hot-reload)
- Loading state ('Loading PDF...') while parsing
- Error state ('Could not load PDF') on failure
- Load cancellation: new request destroys in-flight task
Part of #721
- Add RawFileEditor shared component: textarea with auto-save (debounced 1s
+ Cmd+S), save indicator using design tokens, file-type-agnostic
- Save indicator uses var(--status-running) for 'Saving...' and
var(--status-done) for 'Saved'
- Prevents global command system from stealing Cmd+A/Z/Shift+Z
- onSaved callback for downstream consumers (#729 TeX auto-compile)
- Zoom support via proportional font-size scaling
Part of #721
…729)
Extension side:
- Add tex_support.ts: detectTex() checks PATH for latexmk/pdflatex/xelatex/lualatex
- parseLatexConfig(): reads research-project.toml [latex] section (main, engine,
outdir, auto_compile) — simple TOML parser, no dependency
- resolveEngine(): selection chain (toml > .latexmkrc > latexmk default > first
available engine)
- discoverMainFile(): discovery chain (toml > auto-detect \documentclass > undefined
if ambiguous)
- enrichProjectEntries(): populates previewableFiles + tex capability per project
Bridge extension:
- WorkspaceProjectEntry gains tex?: { available, engine, mainFile? } field
- App-side WorkspaceProject type extended to match
Tests: 8 new tests for TOML parsing, main file discovery, ambiguity handling
Note: The app-side compile UI (Build button, auto-compile, error banner) is
infrastructure-ready but the UI components are placeholder — the compile
command execution and IPC are deferred to the wiring pass.
Part of #721
- Add synctex.ts: parser for .synctex.gz files (gzipped SyncTeX v1 format)
- parseSyncTexFile(): reads and decompresses .synctex.gz, returns SyncTexIndex
- parseSyncTexContent(): parses Input records (tag→filename) and page records
(v/h nodes with tag, line, x, y coordinates)
- forwardSearch(): maps (source file, cursor line) → (page, x, y) position
in the PDF. Matches by full path, suffix, or basename fallback. Finds the
closest line when no exact match exists.
- Graceful degradation: all functions return undefined on any failure (missing
file, corrupt data, parse error) — the PDF viewer opens at its current
position, never crashes.
- Unit tests: 10 tests against a minimal SyncTeX fixture
Part of #721
…lders
- Raw mode: loads file via SDK, renders RawFileEditor with auto-save
- Preview mode for .md: loads file via SDK, renders <Markdown>
- Add structural test: no placeholder strings, imports RawFileEditor + Markdown
- Other preview types: honest 'not yet available' message (source/PDF next)
- Mode toggle (Diff/Raw/Preview) now in the toolbar header, right of the
arrows and left of the unified/split toggle
- Icons: unified (+/-) for Diff, edit (pencil) for Raw, eye for Preview
- Tooltips on hover
- Add toolbarExtra prop to SessionReviewV2Props
- Fix Icon import: v2/icon (has 'unified') instead of v1 icon
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uienhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support

1 participant

@jeonghun-jj-lee
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support - #737

Draft
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements
Draft

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support#737
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes#721

Session work column enhancements

Implementation of the 9-slice feature DAG for #721.

Dependency DAG (5 frontiers)

FrontierIssues
F0#722 (mode toggle), #724 (dropdown search), #725 (project file tree)
F1#723 (save infra), #726 (renderer dispatch)
F2#727 (PDF rendering), #728 (read-write text)
F3#729 (TeX compilation)
F4#730 (SyncTeX forward search)

Phase 1 (complete)

  • Added pdfjs-dist to opencode fork (v1.18.10-amicode.20)
  • Extracted buildCollapsedTree to shared utils/collapsed-tree.ts
  • Extracted ZoomControl to shared components/zoom-control.tsx
  • Re-extracted overlay

In progress

Walking the DAG frontier by frontier...

Picks up fork infrastructure for #721:
- pdfjs-dist@4.10.38 dependency (packages/app/package.json now in overlay)
- Shared buildCollapsedTree + filterCollapsedTree (utils/collapsed-tree.ts)
- Shared ZoomControl component + createZoomState hook (components/zoom-control.tsx)
- Also includes 31bf627498: suppress per-message Changed files section (#733)
@jeonghun-jj-leejeonghun-jj-lee added enhancement New feature or request area:ui labels Sep 2, 2026
@coderabbitai

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Add file-type-modes.ts: pure function mapping file extensions to available
view modes (.md → Diff|Raw|Preview, .tex/.bib/.tikz/.sty → same, other text
→ Diff|Raw, binary → Diff only)
- Add modeToggle + modeContent render props to SessionReviewFilePreviewV2
- Wire per-file-sticky mode state in ReviewPanelV2 (Map<file, mode>)
- SegmentedControlV2 toggle dispatches to correct content area
- Raw and Preview content slots render placeholders until F1 fills them
- Unit tests for file-type classification (12 tests)
Part of #721
- Add transient filter input at the top of the Files Changed file picker dropdown
- Filter narrows the tree by case-insensitive substring match on file path/name
- Filter clears when the dropdown closes (state local to the render prop IIFE)
- Uses filterCollapsedTree from the shared collapsed-tree module
- Autofocus on the input for instant typing
- Empty filter shows the full tree (no change from current behavior)
Part of #721
…#725)
- Add previewable-files.ts: PreviewFileEntry type (extended beyond .md),
PREVIEWABLE_EXTENSIONS constant, isPreviewable() function (unit tests: 7)
- Extend WorkspaceProjectEntry with previewableFiles field (both extension
and app-side types)
- Add scanPreviewableFiles() to extension workspace_projects.ts —
recursive directory scan filtered to previewable types
- Update SessionPreviewTab to accept projectFiles/projectRoot props
- Conditional data source: project files when project loaded, session-touched
.md files when no project (current behavior preserved)
- Add error state: 'Could not load file' inline message on load failure
- Update PreviewFileList: project-source files show no change badge
Part of #721
…ent (#723)
- Migrate save indicator from ad-hoc Tailwind (text-green-500/text-text-weak)
to var(--status-running) / var(--status-done) design tokens
- Add onFileSaved callback prop: fires after POST /file/write completes
(path + success boolean) — hook for #729 TeX auto-compile
- Add onDiffRefreshNeeded callback: fires after save to signal the parent
that diff data should be re-fetched
- Zoom widget extraction was completed in Phase 1 (components/zoom-control.tsx)
Part of #721
- Add renderer-dispatch.ts: getRendererKind() maps extensions to renderer
kinds (markdown, source, image, pdf, unknown)
- getShikiLanguage(): .tex/.tikz/.sty → latex grammar, .bib → bibtex
- hasSourcePreviewToggle(): source files get Raw | Preview toggle
- resolveMainPdf(): convention-based PDF resolution (basename.pdf adjacent)
- Wire renderer dispatch into Files Changed Preview content slot
- Unit tests for dispatch, language mapping, PDF resolution (15 tests)
Part of #721
- Add PDFViewer component: canvas-per-page rendering in scrollable container
- pdfjs-dist worker configured via ?url import (same pattern as shiki worker)
- Zoom support via CSS scale transform (matches markdown preview behavior)
- Scroll-position preservation on reload: saves scrollTop before reload,
restores after DOM update via requestAnimationFrame
- Reactive version prop: incrementing triggers reload (contract for #729
TeX compilation hot-reload)
- Loading state ('Loading PDF...') while parsing
- Error state ('Could not load PDF') on failure
- Load cancellation: new request destroys in-flight task
Part of #721
- Add RawFileEditor shared component: textarea with auto-save (debounced 1s
+ Cmd+S), save indicator using design tokens, file-type-agnostic
- Save indicator uses var(--status-running) for 'Saving...' and
var(--status-done) for 'Saved'
- Prevents global command system from stealing Cmd+A/Z/Shift+Z
- onSaved callback for downstream consumers (#729 TeX auto-compile)
- Zoom support via proportional font-size scaling
Part of #721
…729)
Extension side:
- Add tex_support.ts: detectTex() checks PATH for latexmk/pdflatex/xelatex/lualatex
- parseLatexConfig(): reads research-project.toml [latex] section (main, engine,
outdir, auto_compile) — simple TOML parser, no dependency
- resolveEngine(): selection chain (toml > .latexmkrc > latexmk default > first
available engine)
- discoverMainFile(): discovery chain (toml > auto-detect \documentclass > undefined
if ambiguous)
- enrichProjectEntries(): populates previewableFiles + tex capability per project
Bridge extension:
- WorkspaceProjectEntry gains tex?: { available, engine, mainFile? } field
- App-side WorkspaceProject type extended to match
Tests: 8 new tests for TOML parsing, main file discovery, ambiguity handling
Note: The app-side compile UI (Build button, auto-compile, error banner) is
infrastructure-ready but the UI components are placeholder — the compile
command execution and IPC are deferred to the wiring pass.
Part of #721
- Add synctex.ts: parser for .synctex.gz files (gzipped SyncTeX v1 format)
- parseSyncTexFile(): reads and decompresses .synctex.gz, returns SyncTexIndex
- parseSyncTexContent(): parses Input records (tag→filename) and page records
(v/h nodes with tag, line, x, y coordinates)
- forwardSearch(): maps (source file, cursor line) → (page, x, y) position
in the PDF. Matches by full path, suffix, or basename fallback. Finds the
closest line when no exact match exists.
- Graceful degradation: all functions return undefined on any failure (missing
file, corrupt data, parse error) — the PDF viewer opens at its current
position, never crashes.
- Unit tests: 10 tests against a minimal SyncTeX fixture
Part of #721
…lders
- Raw mode: loads file via SDK, renders RawFileEditor with auto-save
- Preview mode for .md: loads file via SDK, renders <Markdown>
- Add structural test: no placeholder strings, imports RawFileEditor + Markdown
- Other preview types: honest 'not yet available' message (source/PDF next)
- Mode toggle (Diff/Raw/Preview) now in the toolbar header, right of the
arrows and left of the unified/split toggle
- Icons: unified (+/-) for Diff, edit (pencil) for Raw, eye for Preview
- Tooltips on hover
- Add toolbarExtra prop to SessionReviewV2Props
- Fix Icon import: v2/icon (has 'unified') instead of v1 icon
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uienhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support

1 participant

@jeonghun-jj-lee
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support - #737

Draft
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements
Draft

feat: session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support#737
jeonghun-jj-lee wants to merge 13 commits into
mainfrom
amico/issue-721-work-column-enhancements

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes#721

Session work column enhancements

Implementation of the 9-slice feature DAG for #721.

Dependency DAG (5 frontiers)

FrontierIssues
F0#722 (mode toggle), #724 (dropdown search), #725 (project file tree)
F1#723 (save infra), #726 (renderer dispatch)
F2#727 (PDF rendering), #728 (read-write text)
F3#729 (TeX compilation)
F4#730 (SyncTeX forward search)

Phase 1 (complete)

  • Added pdfjs-dist to opencode fork (v1.18.10-amicode.20)
  • Extracted buildCollapsedTree to shared utils/collapsed-tree.ts
  • Extracted ZoomControl to shared components/zoom-control.tsx
  • Re-extracted overlay

In progress

Walking the DAG frontier by frontier...

Picks up fork infrastructure for #721:
- pdfjs-dist@4.10.38 dependency (packages/app/package.json now in overlay)
- Shared buildCollapsedTree + filterCollapsedTree (utils/collapsed-tree.ts)
- Shared ZoomControl component + createZoomState hook (components/zoom-control.tsx)
- Also includes 31bf627498: suppress per-message Changed files section (#733)
@jeonghun-jj-leejeonghun-jj-lee added enhancement New feature or request area:ui labels Sep 2, 2026
@coderabbitai

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Add file-type-modes.ts: pure function mapping file extensions to available
view modes (.md → Diff|Raw|Preview, .tex/.bib/.tikz/.sty → same, other text
→ Diff|Raw, binary → Diff only)
- Add modeToggle + modeContent render props to SessionReviewFilePreviewV2
- Wire per-file-sticky mode state in ReviewPanelV2 (Map<file, mode>)
- SegmentedControlV2 toggle dispatches to correct content area
- Raw and Preview content slots render placeholders until F1 fills them
- Unit tests for file-type classification (12 tests)
Part of #721
- Add transient filter input at the top of the Files Changed file picker dropdown
- Filter narrows the tree by case-insensitive substring match on file path/name
- Filter clears when the dropdown closes (state local to the render prop IIFE)
- Uses filterCollapsedTree from the shared collapsed-tree module
- Autofocus on the input for instant typing
- Empty filter shows the full tree (no change from current behavior)
Part of #721
…#725)
- Add previewable-files.ts: PreviewFileEntry type (extended beyond .md),
PREVIEWABLE_EXTENSIONS constant, isPreviewable() function (unit tests: 7)
- Extend WorkspaceProjectEntry with previewableFiles field (both extension
and app-side types)
- Add scanPreviewableFiles() to extension workspace_projects.ts —
recursive directory scan filtered to previewable types
- Update SessionPreviewTab to accept projectFiles/projectRoot props
- Conditional data source: project files when project loaded, session-touched
.md files when no project (current behavior preserved)
- Add error state: 'Could not load file' inline message on load failure
- Update PreviewFileList: project-source files show no change badge
Part of #721
…ent (#723)
- Migrate save indicator from ad-hoc Tailwind (text-green-500/text-text-weak)
to var(--status-running) / var(--status-done) design tokens
- Add onFileSaved callback prop: fires after POST /file/write completes
(path + success boolean) — hook for #729 TeX auto-compile
- Add onDiffRefreshNeeded callback: fires after save to signal the parent
that diff data should be re-fetched
- Zoom widget extraction was completed in Phase 1 (components/zoom-control.tsx)
Part of #721
- Add renderer-dispatch.ts: getRendererKind() maps extensions to renderer
kinds (markdown, source, image, pdf, unknown)
- getShikiLanguage(): .tex/.tikz/.sty → latex grammar, .bib → bibtex
- hasSourcePreviewToggle(): source files get Raw | Preview toggle
- resolveMainPdf(): convention-based PDF resolution (basename.pdf adjacent)
- Wire renderer dispatch into Files Changed Preview content slot
- Unit tests for dispatch, language mapping, PDF resolution (15 tests)
Part of #721
- Add PDFViewer component: canvas-per-page rendering in scrollable container
- pdfjs-dist worker configured via ?url import (same pattern as shiki worker)
- Zoom support via CSS scale transform (matches markdown preview behavior)
- Scroll-position preservation on reload: saves scrollTop before reload,
restores after DOM update via requestAnimationFrame
- Reactive version prop: incrementing triggers reload (contract for #729
TeX compilation hot-reload)
- Loading state ('Loading PDF...') while parsing
- Error state ('Could not load PDF') on failure
- Load cancellation: new request destroys in-flight task
Part of #721
- Add RawFileEditor shared component: textarea with auto-save (debounced 1s
+ Cmd+S), save indicator using design tokens, file-type-agnostic
- Save indicator uses var(--status-running) for 'Saving...' and
var(--status-done) for 'Saved'
- Prevents global command system from stealing Cmd+A/Z/Shift+Z
- onSaved callback for downstream consumers (#729 TeX auto-compile)
- Zoom support via proportional font-size scaling
Part of #721
…729)
Extension side:
- Add tex_support.ts: detectTex() checks PATH for latexmk/pdflatex/xelatex/lualatex
- parseLatexConfig(): reads research-project.toml [latex] section (main, engine,
outdir, auto_compile) — simple TOML parser, no dependency
- resolveEngine(): selection chain (toml > .latexmkrc > latexmk default > first
available engine)
- discoverMainFile(): discovery chain (toml > auto-detect \documentclass > undefined
if ambiguous)
- enrichProjectEntries(): populates previewableFiles + tex capability per project
Bridge extension:
- WorkspaceProjectEntry gains tex?: { available, engine, mainFile? } field
- App-side WorkspaceProject type extended to match
Tests: 8 new tests for TOML parsing, main file discovery, ambiguity handling
Note: The app-side compile UI (Build button, auto-compile, error banner) is
infrastructure-ready but the UI components are placeholder — the compile
command execution and IPC are deferred to the wiring pass.
Part of #721
- Add synctex.ts: parser for .synctex.gz files (gzipped SyncTeX v1 format)
- parseSyncTexFile(): reads and decompresses .synctex.gz, returns SyncTexIndex
- parseSyncTexContent(): parses Input records (tag→filename) and page records
(v/h nodes with tag, line, x, y coordinates)
- forwardSearch(): maps (source file, cursor line) → (page, x, y) position
in the PDF. Matches by full path, suffix, or basename fallback. Finds the
closest line when no exact match exists.
- Graceful degradation: all functions return undefined on any failure (missing
file, corrupt data, parse error) — the PDF viewer opens at its current
position, never crashes.
- Unit tests: 10 tests against a minimal SyncTeX fixture
Part of #721
…lders
- Raw mode: loads file via SDK, renders RawFileEditor with auto-save
- Preview mode for .md: loads file via SDK, renders <Markdown>
- Add structural test: no placeholder strings, imports RawFileEditor + Markdown
- Other preview types: honest 'not yet available' message (source/PDF next)
- Mode toggle (Diff/Raw/Preview) now in the toolbar header, right of the
arrows and left of the unified/split toggle
- Icons: unified (+/-) for Diff, edit (pencil) for Raw, eye for Preview
- Tooltips on hover
- Add toolbarExtra prop to SessionReviewV2Props
- Fix Icon import: v2/icon (has 'unified') instead of v1 icon
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uienhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session work column enhancements — Files Changed editing + project-wide Preview with PDF and TeX support

1 participant

@jeonghun-jj-lee