INNER CODE UNIT · Python

on_mount

VisionForge-OU/foreman · src/foreman/tui/app.py:95

    def on_mount(self) -> None:
        # Default to the first doc that is awaiting review.
        st = self.app.controller.feature(self.slug)
        for kind in DOC_KINDS:
            d = st.doc(kind)
            if d and d.status in (DocStatus.IN_REVIEW, DocStatus.CHANGES_REQUESTED):
                self.kind = kind
                break
        self.refresh_doc()

    def refresh_doc(self) -> None:
        st = self.app.controller.feature(self.slug)
        d = st.doc(self.kind)
        title = self.query_one("#title", Static)
        md = self.query_one("#md", Markdown)
        oq = self.query_one("#oq", Static)
        if d is None:
            title.update(f"[b]{self.kind}[/b] — (not produced yet)")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…