Skip to content

Add a 'show' page for the BackgroundActivity model #1448

Open

Description

@prioux

In my original design of the BackgroundActivity framework, I never intended for there to be a 'show' page for the models, given each objects basically only has a few scalar pieces of information and two parallel arrays for the items and messages.

Now that I think about it, maybe a show page would still be useful. In particular, I added methods to extract from the list of items the ones that are successful or failed, based on utility detectors (like, nil vs non-nil etc) that each model can invoke. We could extend this to a true general API for accessing these sublists, and each BackgroundActivity model could just override the methods depending on circumstances (the point is, not all BACs record successes and failures the same way).

The 'show' page would also know, for each model, the special options it supports, and a summary of the items list if an appropriate partial view is provided. Filenames for the partials would be like:

  1. For the options section: _options_{background_activity_base_class}.html.erb
  2. For the items section: _items_{background_activity_base_class}.html.erb

The end result could be a useful resource for users and admins to view why a BAC failed or succeed, and what items failed (with nice links if possible).

Activity

  1. PratapShashwat commented on Mar 10, 2026

    @PratapShashwat

    Hi @prioux! I've been looking to dive deeper into the CBRAIN Rails UI and this looks like a great feature to implement.

    If no one is actively working on this, I'd love to take it on. My plan would be to set up the show action, build out the base show.html.erb view, and draft the initial structure for the options and items partials for the base classes to extract the successes/failures as you described.

    Let me know if I'm good to open a PR for this!

  2. prioux commented on Mar 10, 2026

    @prioux
    MemberAuthor

    @PratapShashwat Sergiy is already working on an implementation in #1567 I think

  3. PratapShashwat commented on Mar 10, 2026

    @PratapShashwat

    Hi @prioux ,

    Thanks for the heads-up!

    I'm still very interested in contributing to CBRAIN for GSoC 2026. I'm going to pivot my focus to other issues to help with some of the project's cleanup.

    Looking forward to seeing #1567 merged!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions