Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Only show version badge when currentVersionNumber > 1
Version 1 is the initial version, so a badge is only meaningful when the
feature view has actually changed (version 2+). Also fixes test name to
match the updated threshold and adds a test for the v1 case.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  • Loading branch information
franciscojavierarceo and claude committed Mar 27, 2026
commit 09843229c7ee46fefaa15051c49d8d284dd19a38
35 changes: 34 additions & 1 deletion ui/src/components/RegistryVisualization.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const renderVisualization = (
};

describe("RegistryVisualization version indicators", () => {
test("renders version badge on feature view with currentVersionNumber > 0", async () => {
test("renders version badge on feature view with currentVersionNumber > 1", async () => {
const registry = makeRegistry({
featureViews: [
feast.core.FeatureView.create({
Expand Down Expand Up @@ -121,6 +121,39 @@ describe("RegistryVisualization version indicators", () => {
expect(screen.queryByText("v0")).not.toBeInTheDocument();
});

test("does not render version badge when currentVersionNumber is 1 (initial version)", async () => {
const registry = makeRegistry({
featureViews: [
feast.core.FeatureView.create({
spec: { name: "initial_fv" },
meta: { currentVersionNumber: 1 },
}),
],
entities: [
feast.core.Entity.create({
spec: { name: "my_entity" },
}),
],
});

const relationships = [
makeRelationship(
"initial_fv",
FEAST_FCO_TYPES.featureView,
"my_entity",
FEAST_FCO_TYPES.entity,
),
];

renderVisualization(registry, relationships);

await waitFor(() => {
expect(screen.getByText("initial_fv")).toBeInTheDocument();
});

expect(screen.queryByText("v1")).not.toBeInTheDocument();
});

test("does not render version badge when meta has no version", async () => {
const registry = makeRegistry({
featureViews: [
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/RegistryVisualization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const CustomNode = ({ data }: { data: NodeData }) => {
const [isHovered, setIsHovered] = useState(false);
const hasPermissions = data.permissions && data.permissions.length > 0;
const hasVersion =
data.versionNumber != null && data.versionNumber > 0;
data.versionNumber != null && data.versionNumber > 1;

const handleClick = () => {
let path;
Expand Down
Loading