Skip to content

Partial rendering#167

Open
zanjonke wants to merge 14 commits intomainfrom
feat/partial_rendering
Open

Partial rendering#167
zanjonke wants to merge 14 commits intomainfrom
feat/partial_rendering

Conversation

@zanjonke
Copy link
Copy Markdown
Contributor

@zanjonke zanjonke commented Apr 21, 2026

Summary

Adds partial rendering — when re-running codeplain on a module that has been previously rendered, detect what has changed and offer to resume from the right checkpoint instead of re-rendering everything from scratch.

Given a module tree (e.g. root → middle → leaf), on startup the tool now:

  • Walks the tree looking for: (a) the last FRID successfully rendered, (b) any module whose plain spec has changed since its last render, (c) any module whose required modules' code has changed since.
  • Picks the earliest-affected module and presents a TUI with the available continuation choices (continue from next FRID, re-render from start of changed module, re-render everything, quit).
  • Feeds the user's choice into ModuleRenderer, which renders the chosen starting point before the root module.

The PR can be split in 3 parts:

  • Refactoring of plain_modules.py and module_renderer.py
  • Implementation of partial rendering
  • Addiiton of unit tests

TODO: this is waiting on the design from @kaja-s DONE

Here are some preliminary screenshots.
Screenshot 2026-04-21 at 11 55 02

Screenshot 2026-04-21 at 11 55 23

@zanjonke zanjonke self-assigned this Apr 21, 2026
@zanjonke zanjonke added the enhancement New feature or request label Apr 21, 2026
@zanjonke zanjonke force-pushed the feat/partial_rendering branch 2 times, most recently from 7c4683a to b4929b2 Compare April 21, 2026 09:22
@kaja-s
Copy link
Copy Markdown
Collaborator

kaja-s commented Apr 22, 2026

Here are the final designs for all 13 situations with adjusted content: https://www.figma.com/design/7o1Ql87jRiT7k1Ne0Inugl/design?node-id=11155-2090

@zanjonke zanjonke force-pushed the feat/partial_rendering branch 9 times, most recently from 76e7234 to 8e4bb3b Compare April 24, 2026 08:50
@zanjonke zanjonke force-pushed the feat/partial_rendering branch from 8e4bb3b to 9b096e6 Compare April 24, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants