Skip to content

feat: two-screen layout redesign with log viewer, resources panel, and bug fixes - #47

Open
alefisico wants to merge 23 commits into
cademirch:mainfrom
alefisico:feature/layout-redesign
Open

feat: two-screen layout redesign with log viewer, resources panel, and bug fixes#47
alefisico wants to merge 23 commits into
cademirch:mainfrom
alefisico:feature/layout-redesign

Conversation

@alefisico

Copy link
Copy Markdown

Layout:

Replaced the single-screen layout (large workflow list + three cramped right panels) with a two-screen approach: a full-width workflow list as the default view, pushing a detail screen on selection. Esc returns to the list.

The detail screen has a left panel (rules drill-down → jobs) and a right tabbed panel (Overview / Logs / Resources / Errors).

New features:

  • Log viewer in the Logs tab shows file content directly when a job is selected; a file selector appears only when a job has multiple log files
  • Resources panel shows threads, duration, resource usage, shell command, and wildcards for the selected job
  • Progress display shows percentage only (colour-coded by completion level)

Bug fixes:

  • list_rule_jobs and get_job now eagerly load job.files via selectinload to prevent MissingGreenlet errors when accessing file relationships outside the async session context

alefisico and others added 14 commits May 12, 2026 13:52
Strip overview.py to a list-only WorkflowListView that posts a
WorkflowSelected message on row activation; update DashboardScreen
in app.py to use the new widget and handle navigation to detail screen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sh method

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace StyledProgress percentage strings with render_progress_bar(), which
renders coloured block-character bars (e.g. █████░░░░░  50%) in all tables
and the workflow detail overview.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove unused AppBody class from app.py, fix missing return/parameter
type annotations in widgets.py and app.py, and fix wrong type annotation
and missing status arg in views/detail.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Logs tab now shows file content immediately on job select; file
  selector appears only when job has multiple log files
- Progress display shows percentage only, no visual bar
- Add ShellCmdHandler to logger plugin (patched in dev env) to capture
  shell commands from Snakemake's SHELLCMD event

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cademirch
cademirch self-requested a review May 13, 2026 21:19

@cademirch cademirch left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Gave a quick look through and left some comments. I'll try to get around to testing this out locally soon.

Comment thread tests/test_widgets.py

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These don't seem to be testing anything meaningful. Can we drop these?

)


class ResourcesPanel(Container):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the resources requested by the job - which is all we have until we either parse benchmark files or wait for Snakemake to send benchmark info thru the logger interface. I think this should be more clear that this was resources requested by the job and not resources used.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will make it clear that these are resources requested

except NoMatches:
pass

log_widget = Log(id="log-content", highlight=False)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to test this out, but I think I prefer the log file modal here, since it has more screen real estate there is less line wrapping. Is there a reason the log file modal was replaced with textual Log?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a matter of taste, I personally prefer this way. But maybe I can keep both views if you want

Comment thread pyproject.toml Outdated
[tool.pixi.feature.dev.pypi-dependencies]
snkmt = { path = ".", editable = true }
snakemake-logger-plugin-snkmt = { git = "https://github.com/cademirch/snakemake-logger-plugin-snkmt.git", editable = true, branch="dev" }
snakemake-logger-plugin-snkmt = { git = "https://github.com/alefisico/snakemake-logger-plugin-snkmt.git", editable = true }

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to change this. Note to self - this is why I want to move the logger into this repo, get rid of this dev dependency dance.

Releases might be more annoying though.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. Yeah I will revert

alefisico and others added 5 commits May 14, 2026 12:35
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cademirch
cademirch force-pushed the feature/layout-redesign branch from 4abee05 to 7568c59 Compare May 19, 2026 19:59
@cademirch
cademirch force-pushed the feature/layout-redesign branch from 7568c59 to 7a23fed Compare May 19, 2026 20:01
@cademirch

Copy link
Copy Markdown
Owner

Okay, I've had a chance to play around with this. I like the look of the layout, but the UX is a little confusing to me. It is a little clunky to have to select a job to view its logs on the TabViewer. My impression was that the Overview/Logs/Resources/Errors tab panes were for the selected Rule. I think that would be more intuitive. Such that when you select a rule, the tab pane gives you quick access to the overview of that rule and all of the jobs logs, etc. I've had ideas to do this using the Tree widget from textual.

Overall I think this is the right direction and want to use this PR to develop this further. I'll try to make some mock ups of what im thinking when I have a chance.

@alefisico

Copy link
Copy Markdown
Author

Sounds good. Yeah, feel free to improve it as you think is best.

@cademirch

Copy link
Copy Markdown
Owner

Hi @alefisico - I saw that you pushed some updates to this, sorry I have not had time to take a look yet. I will try to take a look this weekend!

@cademirch

Copy link
Copy Markdown
Owner

Hi @alefisico sorry for my delay on this. I am on vacation until mid July so I will review this when I get back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants