This commit is contained in:
ryan-crabbe-berri 2026-11-06 15:57:12 -05:00 • committed by GitHub
commit 19ead21c1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 1 deletions

View file

@ -465,6 +465,25 @@ describe("KeyInfoView", () => {
});
});
it("bounds the detail panel scroll container to the viewport so edit form actions stay reachable", async () => {
vi.mocked(useAuthorized).mockReturnValue(baseUseAuthorizedMock);
const { container } = renderWithProviders(
<KeyInfoView
keyData={MOCK_KEY_DATA}
onClose={() => {}}
keyId={"test-key-id"}
onKeyDataUpdate={() => {}}
teams={[]}
/>,
);
const boundedScrollContainers = Array.from(container.querySelectorAll(".overflow-y-auto")).filter((el) =>
el.classList.contains("max-h-[85vh]"),
);
expect(boundedScrollContainers).toHaveLength(1);
});
it("should not render tags in metadata textarea", async () => {
vi.mocked(useAuthorized).mockReturnValue(baseUseAuthorizedMock);

View file

@ -581,7 +581,7 @@ export default function KeyInfoView({
const inheritedGates = hasOwnBudget ? [] : inheritedBudgetGates(parentTeam, parentOrg, ownerUser, memberGate);
return (
<div className="w-full h-full overflow-y-auto p-4">
<div className="w-full h-full max-h-[85vh] overflow-y-auto p-4">
<KeyInfoHeader
data={{
keyName: currentKeyData.key_alias || t("keyDetail.keyInfoView.header.defaultKeyName"),