Skip to content

Commit 9c31efb

Browse files
committed
Merge branch 'main' of https://github.com/opendatahub-io/odh-dashboard into flake-check
2 parents 6a9283d + cc83365 commit 9c31efb

191 files changed

Lines changed: 11533 additions & 1369 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/rules/pull-requests.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Pull Request Creation
2+
3+
When creating a pull request targeting `opendatahub-io/odh-dashboard`, you **MUST** use the PR template at `.github/pull_request_template.md` as the PR body structure. Read the template, fill in every section following the HTML comment instructions within it, and include the full checklist. This rule does not apply to PRs targeting other repositories.
4+
5+
## Agent-Specific Guidance
6+
7+
- **Honesty over completeness.** Only check `[x]` checklist items you can substantiate. If you didn't add tests, leave that box unchecked and explain why in the Test Impact section. If you only ran automated checks (lint, type-check), do not check "manually tested."
8+
- **Post-merge items stay unchecked.** The "After the PR is posted & before it merges" items are human tasks — leave them as `[ ]`.
9+
- **UI section is conditional.** If the change has no UI impact, omit the "If you have UI changes" checklist items entirely rather than leaving them unchecked.
10+
- **No bare summaries.** Never skip the template and use a plain paragraph as the PR body. Reviewers expect the full structure.

.coderabbit.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ reviews:
1111
# Baseline already excludes: vendor, node_modules, bin, __pycache__,
1212
# *.sum, *.pb.go, *.generated.go, synced security configs
1313
- "!package-lock.json"
14-
- "!.github/**"
1514
- "!.tekton/**"
1615
- "!**/@mf-types/**"
1716
- "!**/dist/**"

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Rules live in `.claude/rules/`. Read the relevant rule file before starting the
9696
| **Modular Architecture** | `modular-architecture.md` | When working on the plugin/extension system or package integration |
9797
| **Module Federation** | `module-federation.md` | When configuring Module Federation, webpack remotes, or shared dependencies |
9898
| **Module Onboarding** | `module-onboarding.md` | When creating a new package/module in the monorepo |
99+
| **Pull Requests** | `pull-requests.md` | When creating a pull request — must follow `.github/pull_request_template.md` |
99100
| **React** | `react.md` | When writing React components, hooks, or pages |
100101
| **Security** | `security.md` | When working on auth, secrets, input validation, or K8s API interactions |
101102
| **Testing Standards** | `testing-standards.md` | When working across multiple test types or choosing a testing strategy |

frontend/src/app/App.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@ const App: React.FC = () => {
125125
</Alert>
126126
</StackItem>
127127
<StackItem>
128-
<Button
129-
variant="secondary"
130-
onClick={() => logout().then(() => window.location.reload())}
131-
>
128+
<Button variant="secondary" onClick={() => logout()}>
132129
Logout
133130
</Button>
134131
</StackItem>

frontend/src/app/HeaderTools.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ const HeaderTools: React.FC<Props> = ({ onNotificationsClick, ...devFeatureFlags
6060

6161
const handleLogout = () => {
6262
setUserMenuOpen(false);
63-
logout().then(() => {
64-
/* eslint-disable-next-line no-console */
65-
console.log('logged out');
66-
window.location.reload();
67-
});
63+
logout();
6864
};
6965

7066
const userMenuItems = [

frontend/src/app/SessionExpiredModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const SessionExpiredModal: React.FC = () => (
2828
data-testid="modal-login-button"
2929
key="confirm"
3030
variant="primary"
31-
onClick={() => logout().then(() => window.location.reload())}
31+
onClick={() => logout()}
3232
>
3333
Log in
3434
</Button>

frontend/src/app/appUtils.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
export const logout = (): Promise<unknown> =>
2-
/* eslint-disable-next-line no-console */
3-
fetch('/oauth2/sign_out').catch((err) => console.error('Error logging out', err));
1+
import { DEV_MODE } from '#~/utilities/const';
2+
3+
export const logout = (): void => {
4+
if (DEV_MODE) {
5+
/* eslint-disable-next-line no-console */
6+
console.log('you have been logged out in dev mode');
7+
window.location.reload();
8+
return;
9+
}
10+
window.location.href = '/oauth2/sign_out';
11+
};

frontend/src/app/useTimeBasedRefresh.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const useTimeBasedRefresh = (): SetTime => {
3333
lastDate.setHours(lastDate.getHours() + 1);
3434
if (lastDate < refreshDateMarker) {
3535
setNewDateString(refreshDateMarker.toString());
36-
console.log('Logging out and refreshing');
37-
logout().then(() => window.location.reload());
36+
console.log('Logging out and redirecting');
37+
logout();
3838
} else {
3939
console.error(
4040
`We should have refreshed but it appears the last time we auto-refreshed was less than an hour ago. '${KEY_NAME}' session storage setting can be cleared for this to refresh again within the hour from the last refresh.`,

frontend/src/components/TypeaheadSelect.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ export interface TypeaheadSelectProps extends Omit<SelectProps, 'toggle' | 'onSe
9898
dataTestId?: string;
9999
/** Flag to indicate if showing the description under the toggle */
100100
previewDescription?: boolean;
101+
/** Optional icon rendered inside the text input */
102+
inputIcon?: React.ReactNode;
101103
}
102104

103105
const defaultNoOptionsFoundMessage = (filter: string) => `No results found for "${filter}"`;
@@ -127,6 +129,7 @@ const TypeaheadSelect: React.FunctionComponent<TypeaheadSelectProps> = ({
127129
isRequired = true,
128130
previewDescription = true,
129131
dataTestId,
132+
inputIcon,
130133
...props
131134
}: TypeaheadSelectProps) => {
132135
const [isOpen, setIsOpen] = React.useState(false);
@@ -439,9 +442,11 @@ const TypeaheadSelect: React.FunctionComponent<TypeaheadSelectProps> = ({
439442
autoComplete="off"
440443
innerRef={textInputRef}
441444
placeholder={placeholder}
445+
icon={inputIcon}
442446
{...(activeItemId && { 'aria-activedescendant': activeItemId })}
443447
role="combobox"
444448
isExpanded={isOpen}
449+
className="pf-v6-u-w-100"
445450
/>
446451
</FlexItem>
447452
{selected && selected.selectedLabel && <FlexItem>{selected.selectedLabel}</FlexItem>}

frontend/src/concepts/areas/useIsAreaAvailable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from 'react';
22
import { AreaContext } from '#~/concepts/areas/AreaContext';
3-
import { IsAreaAvailableStatus, SupportedArea } from './types';
3+
import { IsAreaAvailableStatus, SupportedAreaType } from './types';
44

5-
const useIsAreaAvailable = (area: SupportedArea): IsAreaAvailableStatus =>
5+
const useIsAreaAvailable = (area: SupportedAreaType): IsAreaAvailableStatus =>
66
React.useContext(AreaContext).areasStatus[area] ?? {
77
status: false,
88
devFlags: null,

0 commit comments

Comments
 (0)