Rename State of Applicability to Statement of Applicability

Rename the entity across the full stack: database table
(states_of_applicability → statements_of_applicability), Go model,
GraphQL types, MCP specification, CLI commands, frontend components,
routes, and display labels. Includes a migration to rename the table
and its foreign key column.

Widen sidebar from 260px to 280px to fit the longer label.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-04-09 13:06:06 +02:00
parent 050073ab3c
commit 5fd580e995
48 changed files with 978 additions and 957 deletions

View File

@@ -24,11 +24,11 @@ import (
)
const listQuery = `
query($id: ID!, $first: Int, $after: CursorKey, $orderBy: StateOfApplicabilityOrder) {
query($id: ID!, $first: Int, $after: CursorKey, $orderBy: StatementOfApplicabilityOrder) {
node(id: $id) {
__typename
... on Organization {
statesOfApplicability(first: $first, after: $after, orderBy: $orderBy) {
statementsOfApplicability(first: $first, after: $after, orderBy: $orderBy) {
totalCount
edges {
node {
@@ -48,7 +48,7 @@ query($id: ID!, $first: Int, $after: CursorKey, $orderBy: StateOfApplicabilityOr
}
`
type stateOfApplicability struct {
type statementOfApplicability struct {
ID string `json:"id"`
Name string `json:"name"`
CreatedAt string `json:"createdAt"`
@@ -118,11 +118,11 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
listQuery,
variables,
flagLimit,
func(data json.RawMessage) (*api.Connection[stateOfApplicability], error) {
func(data json.RawMessage) (*api.Connection[statementOfApplicability], error) {
var resp struct {
Node *struct {
Typename string `json:"__typename"`
StatesOfApplicability api.Connection[stateOfApplicability] `json:"statesOfApplicability"`
Typename string `json:"__typename"`
StatementsOfApplicability api.Connection[statementOfApplicability] `json:"statementsOfApplicability"`
} `json:"node"`
}
if err := json.Unmarshal(data, &resp); err != nil {
@@ -134,7 +134,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
if resp.Node.Typename != "Organization" {
return nil, fmt.Errorf("expected Organization node, got %s", resp.Node.Typename)
}
return &resp.Node.StatesOfApplicability, nil
return &resp.Node.StatementsOfApplicability, nil
},
)
if err != nil {
@@ -143,7 +143,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
if *flagOutput == cmdutil.OutputJSON {
if soas == nil {
soas = []stateOfApplicability{}
soas = []statementOfApplicability{}
}
return cmdutil.PrintJSON(f.IOStreams.Out, soas)
}