Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
04aabfa
feat: add new routes to GuiRoutes
KristijanArmeni Feb 8, 2026
5972394
Merge remote-tracking branch 'upstream/gui-prototype' into gui-prototype
KristijanArmeni Feb 11, 2026
7c5e2a3
fix: make self.back_text optional in GuiPage
KristijanArmeni Feb 11, 2026
f9505c4
Merge remote-tracking branch 'upstream/gui-prototype' into gui-prototype
KristijanArmeni Feb 17, 2026
0296044
add RunAnalysisPage and register it in main_workflow.py
KristijanArmeni Feb 17, 2026
2401a81
add navigation in analysis_params.py
KristijanArmeni Feb 17, 2026
a81ec76
chore: rename ConfigureAnalsys to ConfigureAnalsysiDatasetPage
KristijanArmeni Feb 17, 2026
3c8dd1f
rename analysis_configure.py -> analysis_configure_dataset.py
KristijanArmeni Feb 17, 2026
13abc07
rename analysis_configure_dataset.py -> analysis_dataset.py
KristijanArmeni Feb 17, 2026
cf8e083
update import statements
KristijanArmeni Feb 17, 2026
6abc8a4
fix: imports in main_workflow.py and analyzer_new.py
KristijanArmeni Feb 17, 2026
384e941
fix routing variable names
KristijanArmeni Feb 17, 2026
f1ade8c
feat: update RunAnalysisPage with progress bars and buttons
KristijanArmeni Feb 17, 2026
355394b
feat: disable cancel button after error make return button visible
KristijanArmeni Feb 17, 2026
a8c2747
use nonlocal var for cancel_request tracking
KristijanArmeni Feb 17, 2026
339e6eb
make reuturn and success buttons visible after analysis is run
KristijanArmeni Feb 17, 2026
17af952
dev: use `USE_RENDER_DELAY` constant var
KristijanArmeni Feb 17, 2026
e8cddd1
ux: make return_btn visible after successful analysis
KristijanArmeni Feb 17, 2026
31f3915
feat: wrap analysis run into ui.dialog, initial attempt
KristijanArmeni Feb 25, 2026
17d5bd9
remove retrun button for now
KristijanArmeni Feb 25, 2026
1848cd5
fix routes, button positioning
KristijanArmeni Feb 25, 2026
b549c37
add PostAnalysisPage and add to workflow
KristijanArmeni Feb 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions gui/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ class GuiRoutes(BaseModel):
select_analyzer_fork: str = "/select_analyzer_fork"
select_analyzer: str = "/select_analyzer"
select_previous_analyzer: str = "/select_previous_analyzer"
configure_analysis: str = "/configure_analysis"
configure_analysis_dataset: str = "/configure_analysis_dataset"
configure_analysis_parameters: str = "/configure_analysis_parameters"
preview_dataset: str = "/preview_dataset"
run_analysis: str = "/run_analysis"
post_analysis: str = "/post_analysis"


class GuiColors(BaseModel):
Expand Down Expand Up @@ -297,13 +299,16 @@ def _render_header(self) -> None:
with ui.row().classes("w-full items-center justify-between"):
# Left: Back button or spacer
with ui.element("div").classes("flex items-center"):
if self.show_back_button and self.back_route and self.back_text:
ui.button(
text=self.back_text,
icon=self.back_icon,
color="accent",
on_click=self._handle_back_click,
).props("flat")
if self.show_back_button and self.back_route:
# Build button parameters conditionally
btn_kwargs = {
"icon": self.back_icon,
"color": "accent",
"on_click": self._handle_back_click,
}
if self.back_text:
btn_kwargs["text"] = self.back_text
ui.button(**btn_kwargs).props("flat")

# Center: Title
ui.label(self.title).classes("text-h6")
Expand Down
27 changes: 21 additions & 6 deletions gui/main_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
from gui.context import GUIContext
from gui.pages import (
ConfigureAnalaysisParams,
ConfigureAnalysis,
ConfigureAnalysisDatasetPage,
ImportDatasetPage,
NewProjectPage,
PostAnalysisPage,
PreviewDatasetPage,
RunAnalysisPage,
SelectAnalyzerForkPage,
SelectNewAnalyzerPage,
SelectPreviousAnalyzerPage,
Expand Down Expand Up @@ -81,20 +83,33 @@ def select_previous_analyzer():
page = SelectPreviousAnalyzerPage(session=gui_session)
page.render()

@ui.page(gui_routes.configure_analysis)
def configure_analysis():
page = ConfigureAnalysis(session=gui_session)
@ui.page(gui_routes.configure_analysis_dataset)
def configure_analysis_dataset():
"""Renders page where user selects dataset columns and previews."""
page = ConfigureAnalysisDatasetPage(session=gui_session)
page.render()

@ui.page(gui_routes.configure_analysis_parameters)
def configure_analysis_parameters():
"""Render page to allow user to configure analysis parameters."""
page = ConfigureAnalaysisParams(session=gui_session)
page.render()

@ui.page(gui_routes.run_analysis)
def run_analysis():
"""Render page that runs the analysis with selected parameters."""
page = RunAnalysisPage(session=gui_session)
page.render()

@ui.page(gui_routes.post_analysis)
def post_analysis():
"""Show options once analysis completes."""
page = PostAnalysisPage(session=gui_session)
page.render()

# Launch in native mode
ui.run(
native=False,
window_size=(800, 600),
native=True,
title="CIB Mango Tree",
favicon="🥭",
reload=False,
Expand Down
8 changes: 6 additions & 2 deletions gui/pages/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from .analysis_configure import ConfigureAnalysis
from .analysis_dataset import ConfigureAnalysisDatasetPage
from .analysis_params import ConfigureAnalaysisParams
from .analysis_post import PostAnalysisPage
from .analysis_run import RunAnalysisPage
from .analyzer_new import SelectNewAnalyzerPage
from .analyzer_previous import SelectPreviousAnalyzerPage
from .analyzer_select import SelectAnalyzerForkPage
Expand All @@ -17,7 +19,9 @@
"SelectAnalyzerForkPage",
"SelectNewAnalyzerPage",
"SelectPreviousAnalyzerPage",
"ConfigureAnalysis",
"ConfigureAnalysisDatasetPage",
"ConfigureAnalaysisParams",
"RunAnalysisPage",
"PostAnalysisPage",
"PreviewDatasetPage",
]
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
from gui.base import GuiPage, GuiSession, gui_routes


class ConfigureAnalysis(GuiPage):
class ConfigureAnalysisDatasetPage(GuiPage):
def __init__(self, session: GuiSession):
config_analysis_title: str = "Configure Analysis"
super().__init__(
session=session,
route=gui_routes.configure_analysis,
route=gui_routes.configure_analysis_dataset,
title=(
f"{session.current_project.display_name}: {config_analysis_title}"
if session.current_project is not None
Expand Down
6 changes: 3 additions & 3 deletions gui/pages/analysis_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, session: GuiSession):
route=gui_routes.configure_analysis_parameters,
title=f"{session.current_project.display_name}: Configure Parameters",
show_back_button=True,
back_route=gui_routes.configure_analysis,
back_route=gui_routes.configure_analysis_dataset,
show_footer=True,
)

Expand All @@ -27,7 +27,7 @@ def render_content(self):

if not self.session.column_mapping:
self.notify_warning("Column mapping not configured. Redirecting...")
self.navigate_to(gui_routes.configure_analysis)
self.navigate_to(gui_routes.configure_analysis_dataset)
return

analyzer = self.session.selected_analyzer
Expand Down Expand Up @@ -106,7 +106,7 @@ def _on_proceed():
self.session.analysis_params = final_params

# TODO: Navigate to next step (run analysis or review page)
self.notify_success("Coming soon!")
self.navigate_to(gui_routes.run_analysis)

ui.button(
"Proceed to Run Analysis",
Expand Down
44 changes: 44 additions & 0 deletions gui/pages/analysis_post.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from nicegui import ui

from gui.base import GuiPage, GuiSession, gui_routes

BUTTON_OPTIONS = {
"dashboard": "Open results dashboard",
"export": "Export raw output files",
"open_folder": "Open results folder",
}


class PostAnalysisPage(GuiPage):

def __init__(self, session: GuiSession):
super().__init__(
session=session,
route=gui_routes.post_analysis,
title=f"{session.current_project.display_name}: Configure Parameters",
show_back_button=True,
back_route=gui_routes.configure_analysis_dataset,
show_footer=True,
)

def render_content(self):

with (
ui.column()
.classes("items-center justify-center")
.style("height: 80vh; width: 100%")
):
# Prompt label
ui.label("What would you like to do next?").classes("q-mb-lg").style(
"font-size: 1.05rem"
)

# Action buttons row
with ui.row().classes("gap-4"):

for btn_label in BUTTON_OPTIONS.values():
ui.button(
btn_label,
on_click=ui.notify("Coming soon!"),
color="primary",
)
Loading
Loading