Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bf1ba71
Migrate to proxy architecture with lazy loading
talissoncosta Dec 17, 2025
8ecc16c
Add husky, lint-staged, and CI workflow
talissoncosta Dec 17, 2025
b430daa
Add dist-types to gitignore
talissoncosta Dec 17, 2025
af2cc62
Fix CI build with safer TypeScript compilation
talissoncosta Dec 17, 2025
1d87124
Simplify TypeScript build script
talissoncosta Dec 17, 2025
a4bdcb5
Split CI into 3 parallel jobs: lint, typecheck, build
talissoncosta Dec 17, 2025
4e25dbf
Add dev preview with mock data and Codespaces support
talissoncosta Dec 17, 2025
5319f85
Fix TypeError when accessing feature_state_value properties
talissoncosta Dec 19, 2025
55f1245
Remove unused getEnvironmentFeatures method
talissoncosta Dec 19, 2025
17d538c
Remove unused dependencies: @backstage/theme, @material-ui/lab, react…
talissoncosta Dec 19, 2025
83e9c32
chore: add missing EOF newline and ignore dist-demo
talissoncosta Dec 23, 2025
9511e90
Add alpha export with Backstage new frontend system
talissoncosta Dec 19, 2025
c50659d
refactor: remove legacy frontend system files
talissoncosta Dec 23, 2025
fc41454
feat: make new frontend system the default export
talissoncosta Dec 23, 2025
796e205
chore: remove alpha export path from package.json
talissoncosta Dec 23, 2025
bf06364
fix(dev): update dev server for new frontend system
talissoncosta Dec 23, 2025
74f6679
refactor: remove component exports from index
talissoncosta Dec 23, 2025
747085b
feat(theme): add Flagsmith theme constants and dashboard URL helpers
talissoncosta Dec 19, 2025
92ee2bd
feat(components): add shared UI components for flag status display
talissoncosta Dec 19, 2025
c847928
feat(api): add feature state interfaces for lazy loading
talissoncosta Dec 19, 2025
ebcdedc
feat(FlagsTab): add Jira-style per-environment table with lazy loading
talissoncosta Dec 19, 2025
3d1e341
feat(OverviewCard): add summary stats and dashboard link
talissoncosta Dec 19, 2025
355b327
feat(UsageCard): apply Flagsmith brand colors to chart
talissoncosta Dec 19, 2025
e75d793
test(mocks): update mock data for lazy loading feature states
talissoncosta Dec 19, 2025
14787ef
refactor(FlagsTab): remove misleading enabled/disabled counts
talissoncosta Dec 19, 2025
0a90fe1
refactor(FlagsTab): split into smaller focused components
talissoncosta Dec 23, 2025
25c64e4
feat: add custom hooks and utility functions for testability
talissoncosta Dec 23, 2025
4fd7019
refactor(FlagsmithOverviewCard): split into smaller components
talissoncosta Dec 23, 2025
5f65b4c
refactor(FlagsmithUsageCard): split into smaller components
talissoncosta Dec 23, 2025
78a2a98
refactor(FlagsTab): use useFlagsmithProject hook for consistency
talissoncosta Dec 23, 2025
8c1638a
feat(shared): add reusable LoadingState and MiniPagination components
talissoncosta Dec 23, 2025
e48f6bc
Merge remote-tracking branch 'origin/main' into feat/6422-ui-improvem…
talissoncosta Jan 5, 2026
97c5907
refactor(SearchInput): remove unnecessary debounce logic
talissoncosta Jan 5, 2026
c11a02e
fix(useFlagsmithProject): add fallback for empty API responses
talissoncosta Jan 5, 2026
a209f6d
refactor(types): add initial_value to FlagsmithFeature interface
talissoncosta Jan 5, 2026
ba6fcba
refactor(SegmentOverridesSection): avoid filtering twice
talissoncosta Jan 5, 2026
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
117 changes: 108 additions & 9 deletions dev/mockHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ const mockFeatures = [
is_archived: false,
tags: ['ui', 'theme'],
owners: [{ id: 1, name: 'John Doe', email: 'john@example.com' }],
num_segment_overrides: 1,
num_identity_overrides: 5,
// Multi-environment status
environment_state: [
{ id: 101, enabled: true }, // Dev - enabled
{ id: 102, enabled: true }, // Staging - enabled
{ id: 103, enabled: false }, // Prod - disabled (not yet rolled out)
],
},
{
id: 1002,
Expand All @@ -53,6 +61,13 @@ const mockFeatures = [
is_archived: false,
tags: ['checkout', 'experiment'],
owners: [{ id: 2, name: 'Jane Smith', email: 'jane@example.com' }],
num_segment_overrides: 2,
num_identity_overrides: 0,
environment_state: [
{ id: 101, enabled: true }, // Dev - enabled
{ id: 102, enabled: false }, // Staging - disabled
{ id: 103, enabled: false }, // Prod - disabled
],
},
{
id: 1003,
Expand All @@ -65,6 +80,13 @@ const mockFeatures = [
is_archived: false,
tags: ['api', 'performance'],
owners: [],
num_segment_overrides: 0,
num_identity_overrides: 0,
environment_state: [
{ id: 101, enabled: true }, // Dev - enabled
{ id: 102, enabled: true }, // Staging - enabled
{ id: 103, enabled: true }, // Prod - enabled
],
},
{
id: 1004,
Expand All @@ -77,6 +99,13 @@ const mockFeatures = [
is_archived: false,
tags: ['beta'],
owners: [{ id: 1, name: 'John Doe', email: 'john@example.com' }],
num_segment_overrides: 3,
num_identity_overrides: 12,
environment_state: [
{ id: 101, enabled: true }, // Dev - enabled
{ id: 102, enabled: true }, // Staging - enabled
{ id: 103, enabled: true }, // Prod - enabled (for beta users only via segment)
],
},
{
id: 1005,
Expand All @@ -89,6 +118,13 @@ const mockFeatures = [
is_archived: false,
tags: ['ops'],
owners: [],
num_segment_overrides: 0,
num_identity_overrides: 0,
environment_state: [
{ id: 101, enabled: false }, // Dev - disabled
{ id: 102, enabled: false }, // Staging - disabled
{ id: 103, enabled: false }, // Prod - disabled
],
},
];

Expand Down Expand Up @@ -142,23 +178,86 @@ const mockFeatureVersions: Record<number, any[]> = {

const mockFeatureStates: Record<string, any[]> = {
'v1-dark-mode-uuid': [
{ id: 2001, enabled: true, feature_segment: null, feature_state_value: null },
{ id: 2002, enabled: true, feature_segment: 501, feature_state_value: null }, // Segment override
{
id: 2001,
enabled: true,
environment: 101,
feature_segment: null,
feature_state_value: { string_value: 'dark', integer_value: null, boolean_value: null },
updated_at: '2024-12-01T10:00:00Z',
},
{
id: 2002,
enabled: true,
environment: 101,
feature_segment: { segment: 501, priority: 1 },
feature_state_value: { string_value: 'auto', integer_value: null, boolean_value: null },
updated_at: '2024-12-05T14:30:00Z',
},
],
'v1-checkout-uuid': [
{ id: 2003, enabled: false, feature_segment: null, feature_state_value: null },
{ id: 2004, enabled: true, feature_segment: 502, feature_state_value: null }, // Beta users segment
{
id: 2003,
enabled: false,
environment: 101,
feature_segment: null,
feature_state_value: null,
updated_at: '2024-03-15T09:00:00Z',
},
{
id: 2004,
enabled: true,
environment: 101,
feature_segment: { segment: 502, priority: 1 },
feature_state_value: { string_value: null, integer_value: null, boolean_value: true },
updated_at: '2024-03-20T11:00:00Z',
},
],
'v1-rate-limit-uuid': [
{ id: 2005, enabled: true, feature_segment: null, feature_state_value: '1000' },
{
id: 2005,
enabled: true,
environment: 101,
feature_segment: null,
feature_state_value: { string_value: null, integer_value: 1000, boolean_value: null },
updated_at: '2024-01-21T00:00:00Z',
},
],
'v1-beta-uuid': [
{ id: 2006, enabled: false, feature_segment: null, feature_state_value: null },
{ id: 2007, enabled: true, feature_segment: 503, feature_state_value: null }, // Beta testers
{ id: 2008, enabled: true, feature_segment: 504, feature_state_value: null }, // Internal users
{
id: 2006,
enabled: false,
environment: 101,
feature_segment: null,
feature_state_value: null,
updated_at: '2024-04-05T16:45:00Z',
},
{
id: 2007,
enabled: true,
environment: 101,
feature_segment: { segment: 503, priority: 1 },
feature_state_value: null,
updated_at: '2024-04-10T12:00:00Z',
},
{
id: 2008,
enabled: true,
environment: 101,
feature_segment: { segment: 504, priority: 2 },
feature_state_value: null,
updated_at: '2024-04-12T09:00:00Z',
},
],
'v1-maintenance-uuid': [
{ id: 2009, enabled: false, feature_segment: null, feature_state_value: null },
{
id: 2009,
enabled: false,
environment: 101,
feature_segment: null,
feature_state_value: { string_value: 'Scheduled maintenance', integer_value: null, boolean_value: null },
updated_at: '2024-02-28T08:00:00Z',
},
],
};

Expand Down
18 changes: 16 additions & 2 deletions src/api/FlagsmithClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export interface FlagsmithFeature {
type?: string;
default_enabled?: boolean;
is_archived?: boolean;
initial_value?: string | null;
}

export interface FlagsmithFeatureVersion {
Expand All @@ -60,11 +61,24 @@ export interface FlagsmithFeatureVersion {
published_by?: string | null;
}

export interface FlagsmithFeatureStateValue {
string_value?: string | null;
integer_value?: number | null;
boolean_value?: boolean | null;
}

export interface FlagsmithFeatureSegment {
segment: number;
priority: number;
}

export interface FlagsmithFeatureState {
id: number;
enabled: boolean;
feature_segment?: number | null;
feature_state_value?: string | null;
environment?: number;
feature_segment?: FlagsmithFeatureSegment | null;
feature_state_value?: FlagsmithFeatureStateValue | null;
updated_at?: string | null;
}

export interface FlagsmithFeatureDetails {
Expand Down
Loading