Skip to content

Track approved changes; ui; resolvers and storage#7960

Open
jdolle wants to merge 8 commits intomainfrom
proposal-change-tracking
Open

Track approved changes; ui; resolvers and storage#7960
jdolle wants to merge 8 commits intomainfrom
proposal-change-tracking

Conversation

@jdolle
Copy link
Copy Markdown
Collaborator

@jdolle jdolle commented Apr 9, 2026

Background

Internal documentation:
https://guild-oss.slack.com/docs/TAYJ1FSUA/F0ALG3E94LD

https://linear.app/the-guild/issue/CONSOLE-1755/schema-proposals-for-all-proposal-states-show-which-changes-have-been

Description

Adds schema proposal change tracking. The initial plan was to have a check mark next to the change but during implementation this felt out of place, so the implementation is shown inside the change accordion for the time being.

Screenshot 2026-04-07 at 6 38 50 PM

The task to create the approved change records is not yet complete. Since the number of changes could be numerous, I want to do this in a background task.

Checklist

  • Testing -- added unit test to cover the problem case.

@jdolle jdolle requested a review from n1ru4l April 9, 2026 03:18
@jdolle jdolle self-assigned this Apr 9, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements tracking for approved schema changes, enabling the association of proposed changes with their eventual implementation in schema versions. Key additions include a new proposal_approved_changes table, a DataLoader for efficient change matching, and UI updates to display proposal links in the schema history and check results. Feedback highlights a SQL syntax error in the storage provider, a runtime error in the proposal manager's batching logic, and a missing authorization check for proposal IDs. Furthermore, debug code in the registry checks should be removed, and generic errors in resolvers should be replaced with specific error classes.

Comment thread packages/services/api/src/modules/proposals/providers/schema-proposal-storage.ts Outdated
Comment thread packages/services/api/src/modules/proposals/providers/schema-proposal-manager.ts Outdated
Comment thread packages/services/api/src/modules/schema/resolvers/Mutation/schemaCheck.ts Outdated
Comment thread packages/services/api/src/modules/schema/providers/registry-checks.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

🐋 This PR was built and pushed to the following Docker images:

Targets: build

Platforms: linux/amd64

Image Tag: 6ba22faf6cddcf1ffda5015b246179b8aa404214

}),
})
private async internalCheck(input: CheckInput) {
private async internalCheck(input: CheckInput): Promise<CheckResult> {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the typing in this file is to clean up the response type. Before ts was getting confused about the exact format of the union of types

Comment thread packages/services/api/package.json Outdated
"@date-fns/utc": "2.1.1",
"@graphql-hive/core": "workspace:*",
"@graphql-hive/signal": "1.0.0",
"@graphql-inspector/compare-changes": "0.1.0-alpha-20260328000712-2cf98744a012fa66614588ed89ba99719b0f461b",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const parser = new MaxTokensParserWLexer(source, {
...options,
n: 800,
n: 1_000,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes operation keeps bumping up against the limit and rather than fight it or implement a one-off condition, I don't see an issue with increasing this slightly.

@jdolle jdolle force-pushed the proposal-change-tracking branch from 33cb4c7 to 79537e2 Compare April 9, 2026 18:32
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
hive 11.0.3-alpha-20260415005610-6ba22faf6cddcf1ffda5015b246179b8aa404214 npm ↗︎ unpkg ↗︎

Add proposal change approval tracking job
@jdolle jdolle force-pushed the proposal-change-tracking branch from ba634bb to b0baa8c Compare April 10, 2026 00:18
@jdolle jdolle changed the title Add pg migration to track approved changes; ui; resolvers and storage Track approved changes; ui; resolvers and storage Apr 13, 2026
@jdolle jdolle marked this pull request as ready for review April 14, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant