Skip to content

Comments

when switching to relative time mode, automatically convert any clock times to relative minutes#185

Merged
daattali merged 2 commits intomasterfrom
feat-relative-time-convert
Feb 19, 2026
Merged

when switching to relative time mode, automatically convert any clock times to relative minutes#185
daattali merged 2 commits intomasterfrom
feat-relative-time-convert

Conversation

@daattali
Copy link
Collaborator

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @daattali, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the application's time handling by introducing an automatic conversion mechanism for dose table entries when the time mode is changed to relative. This ensures that time inputs are consistently represented, improving data integrity and user experience. Additionally, the PR includes minor code formatting adjustments to maintain code quality.

Highlights

  • Automatic Time Conversion: Implemented an observeEvent that automatically converts any existing clock time entries (HH:MM) in the dose table to relative minutes when the application's time mode is switched to 'relative'.
  • Code Formatting: Standardized indentation across multiple profileCode blocks and other sections within R/app_server.R and R/simulationPlot.R for improved readability and consistency.
Changelog
  • R/app_server.R
    • Added a new observeEvent for input$timeMode to convert clock times to relative minutes.
    • Corrected indentation for profileCode blocks within output$doseTableHTML, observe (for bookmarking), onRestored, observeEvent(input$doseTableHTML), testCovariates, drugs, doseTableClean, eventTableClean, plotMaximum, steps, simulationPlotRetval, observeEvent(input$plot_click), observeEvent(input$plot_dblclick), observeEvent(input$clickOKDrug), output$editPriorDosesTable, observeEvent(input$editDosesOK), observeEvent(input$clickOKEvent), observeEvent(input$editEvents), observeEvent(input$editEventsOK), observeEvent(input$dblclickOK), observeEvent(input$dblclickDelete), observeEvent(input$setTarget), observeEvent(input$targetOK), output$editDrugsHTML, and observeEvent(input$drugEditsOK).
  • R/simulationPlot.R
    • Removed a commented-out browser() call.
    • Adjusted indentation for the outputComments call at the beginning of the function.
Activity
  • daattali created this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a feature to automatically convert clock times to relative minutes when switching to the relative time mode. This is achieved by adding a new observeEvent for input$timeMode. The changes also include code re-indentation across R/app_server.R for better readability and removal of a commented-out debug statement in R/simulationPlot.R.

My review focuses on the new observer, where I've suggested an improvement for efficiency and to ensure all relevant data tables are updated consistently.

@github-actions
Copy link

Preview Deployment

This PR has been deployed to: https://steveshafer.shinyapps.io/stanpumpr_PR_185/

This deployment will be automatically cleaned up when the PR is closed.

@daattali
Copy link
Collaborator Author

In the previous PR, I added the ability to have absolute vs relative time.

This PR makes it so that when switching from absolute to relative time, any HH:MM times will be automatically converted

@github-actions
Copy link

Preview Deployment

This PR has been deployed to: https://steveshafer.shinyapps.io/stanpumpr_PR_185/

This deployment will be automatically cleaned up when the PR is closed.

@daattali daattali merged commit bb88c5f into master Feb 19, 2026
5 checks passed
@github-actions github-actions bot removed the DEPLOY label Feb 19, 2026
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