Skip to content

update the distinct active state for the Job and Job Sets tab#4887

Open
YHines004 wants to merge 9 commits intomasterfrom
fix/Job-JobSets-visual-active-tab
Open

update the distinct active state for the Job and Job Sets tab#4887
YHines004 wants to merge 9 commits intomasterfrom
fix/Job-JobSets-visual-active-tab

Conversation

@YHines004
Copy link
Copy Markdown
Collaborator

What type of PR is this?

Enhancement

What this PR does / why we need it

This PR give the button/tab for Job and Job Sets a distinct active state when one of them are selected. We need this to give a distinctive state of which tab is active.

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

@YHines004 YHines004 force-pushed the fix/Job-JobSets-visual-active-tab branch from 5fb438c to 5877261 Compare April 28, 2026 20:44
@YHines004 YHines004 changed the title chore: update the active button for the Job and Job Sets tab update the active distinct state for the Job and Job Sets tab Apr 28, 2026
@YHines004 YHines004 changed the title update the active distinct state for the Job and Job Sets tab update the distinct active state for the Job and Job Sets tab Apr 28, 2026
@YHines004 YHines004 marked this pull request as ready for review May 4, 2026 15:10
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 4, 2026

Greptile Summary

This PR adds a visible active-state indicator to the Jobs and Job Sets navigation buttons by wiring up React Router's NavLink .active class to new CSS rules and a theme-derived CSS custom property (--nav-active-bg).

  • end: true is added to the Jobs route so that the root path / only matches exactly, preventing the Jobs tab from always appearing highlighted when navigating to Job Sets or other pages.
  • A CSS custom property --nav-active-bg is set on StyledAppBar using alpha(theme.palette.appBar.contrastText, 0.33), making the active-tab background colour theme-aware.
  • The CSS .toolbar a.MuiButton-root.active rule consumes the CSS variable and applies font-weight: bold.

Confidence Score: 5/5

Safe to merge — purely additive UI styling with no impact on data or routing logic beyond the end fix for the root path.

The end: true fix for the JOBS route correctly prevents the root path from prefix-matching every URL now that the active class has a visible effect. The CSS variable is properly inherited from the styled AppBar, and the end prop is correctly forwarded through the NavLinkButton spread. No data paths, API calls, or auth flows are touched.

No files require special attention.

Important Files Changed

Filename Overview
internal/lookoutui/src/app/NavBar.tsx Adds end?: boolean to the Page interface, sets end: true for the Jobs route, passes it through to NavLinkButton, and defines the --nav-active-bg CSS custom property on the styled AppBar using the theme's contrastText colour via alpha.
internal/lookoutui/src/app/NavBar.css Adds a background-color transition on all nav-button anchors and an .active rule that reads the theme-derived --nav-active-bg CSS custom property and applies bold font weight.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User navigates to URL] --> B{Current path}
    B -->|exactly /| C[JOBS NavLink end=true - React Router adds .active class]
    B -->|starts with /job-sets| D[JOB SETS NavLink - React Router adds .active class]
    B -->|any other path| E[Neither NavLink is active]
    C --> F[CSS applies nav-active-bg background and bold font]
    D --> F
    F --> G[Active tab visually highlighted]
    E --> H[No highlight shown]
Loading

Reviews (4): Last reviewed commit: "chore: update based on comments" | Re-trigger Greptile

Comment thread internal/lookoutui/src/app/NavBar.css
Comment thread internal/lookoutui/src/app/NavBar.css
YHines004 and others added 6 commits May 4, 2026 12:41
Drops the failure_info jsonb column from job_run. Nothing writes or
reads it after #4843 and #4853, and the column was never populated in
production outside the opt-in flag path anyway.

Also drops the unused FailureInfo field from the queryapi sqlc model.

Only merge after #4843 and #4853 have been deployed long enough that we
are sure no consumer still depends on the column.

Signed-off-by: Dejan Zele Pejchev <[email protected]>
Signed-off-by: Yasmine Hines <[email protected]>
<!-- Thanks for sending a pull request! Here are some tips for you: -->

#### What type of PR is this?

#### What this PR does / why we need it

Updating Lookout to include a hot/cold flag for utilizing the hot/cold
partitioned jobs database, as well as updating the lookout pruner to
only prune jobs from the `job_terminated` table when hot/cold is in use

#### Which issue(s) this PR fixes
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related
issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #

#### Special notes for your reviewer

---------

Signed-off-by: David Slear <[email protected]>
Signed-off-by: Yasmine Hines <[email protected]>
<!-- Thanks for sending a pull request! Here are some tips for you: -->

#### What type of PR is this?

feature / observability

#### What this PR does / why we need it

Adds a Prometheus counter metric to the lookout ingester to track job state updates processed by UpdateJobs(). The metric (`lookout_ingester_job_state_updates_total`) is labeled by state, allowing operators to observe transition rates and specifically monitor terminal state updates, which trigger cross-partition row movement in the Lookout database.

Also fixes error categorization schema in `_local/executor` configs that was broken by a prior change.

#### Special notes for your reviewer

The `terminal_state_updates_total` counter was initially added as a standalone metric but was removed in favor of deriving it via PromQL from the per-state counter (sum by state where state is terminal).

---------

Signed-off-by: Ian Hockett <[email protected]>
Signed-off-by: Yasmine Hines <[email protected]>
@YHines004 YHines004 force-pushed the fix/Job-JobSets-visual-active-tab branch from 7467ad3 to 60bc2e1 Compare May 4, 2026 17:41
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.

4 participants