Skip to content

feat: add backend logic for determining tasks tab visibility #18401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

hugodutka
Copy link
Contributor

@hugodutka hugodutka commented Jun 17, 2025

This PR implements the backend logic for determining if the Tasks tab should be visible in the web UI as described in the RFC.

The frontend component will be added in a follow-up PR once the entire Tasks backend is implemented so as not to break the dogfood environment until then.

@hugodutka hugodutka changed the title feat: tasks tab visibility feat: add backend logic for determining tasks tab visibility Jun 18, 2025
@hugodutka hugodutka marked this pull request as ready for review June 18, 2025 13:50
@hugodutka hugodutka requested a review from dannykopping June 18, 2025 13:51
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

Couple nits but LGTM


hasAITask, err := h.opts.Database.HasTemplateVersionsWithAITask(ctx)
if err != nil {
return err
Copy link
Contributor

Choose a reason for hiding this comment

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

An error here will cause all the other goroutines to be canceled; should we rather log only since this isn't an essential feature?

go func() {
defer wg.Done()
tasksTabVisible, err := json.Marshal(tasksTabVisible)
if err == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's rather log on error and explicitly set TasksTabVisible to false.

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