This commit is contained in:
ryan-crabbe-berri 2026-09-24 16:57:50 -04:00 • committed by GitHub
commit e4cd359b29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 1 deletions

View file

@ -326,6 +326,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

@ -513,7 +513,7 @@ export default function KeyInfoView({
const inheritedGates = hasOwnBudget ? [] : inheritedBudgetGates(parentTeam, parentOrg, ownerUser);
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 || "Virtual Key",