feat(figma): Figma in API endpoints, screenshot hosting (Phase F — T4F.1, T4F.2) - #6
Open
canonical-muhammadbassiony wants to merge 4 commits into
Open
Conversation
added 4 commits
May 20, 2026 14:16
…nterface T4F.1: IssueRequest and APIRequest/WorkflowRequest accept figma_url (optional) T4F.1: handlers set cfg.FigmaURL and cfg.FigmaToken from BAUER_FIGMA_TOKEN env var T4F.1: BAUER_FIGMA_TOKEN documented in .env.example T4F.2: ScreenshotHost interface in internal/artifacts/hosting.go T4F.2: LocalFileServer, NopHost, S3Host (stub) implementations T4F.2: HostFromEnv selects backend from BAUER_STATIC_BASE_URL / BAUER_S3_BUCKET T4F.2: IssuesHandler uses HostFromEnv; warns when no hosting configured with figma_url T4F.2: /static/ route serves artifact dir when BAUER_STATIC_BASE_URL is configured
- cmd/bauer/main.go: restore fs.Usage closure (help text was printing unconditionally) - cmd/app/v1/jira.go: add nil-agent guard (prevent panic on NewClient failure) - internal/auth/middleware.go: fail-closed when OIDC configured but JWKS fetch fails - internal/artifacts/hosting.go: reject path traversal in LocalFileServer.Host()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires Figma support into the API endpoints and introduces a screenshot hosting interface, completing Phase F of spec 002.
Tasks Implemented
POST /api/v1/workflowsnow accepts optionalfigma_urlfield — piped throughAPIRequest→WorkflowInput→ orchestrator config.POST /api/v1/issuesalready had support from the issues handler.ScreenshotHostinterface (internal/artifacts/hosting.go) with three implementations:LocalFileServer— serves screenshots from the artifacts directory (local dev)NopHost— no-op when no hosting is configuredS3Host— stub for future S3 integrationHostFromEnvfactory selects backend fromBAUER_STATIC_BASE_URL/BAUER_S3_BUCKET/static/whenBAUER_STATIC_BASE_URLis set.Review Fixes (applied on this branch)
This branch also includes fixes found during the stack review:
fs.Usageclosure incmd/bauer/main.gocmd/app/v1/jira.gointernal/auth/middleware.gointernal/artifacts/hosting.goFiles Changed
internal/workflow/api.go—FigmaURLinAPIRequestandWorkflowInputinternal/workflow/workflow.go—FigmaURL/FigmaTokeninWorkflowInputinternal/artifacts/hosting.go—ScreenshotHostinterface + implementationscmd/app/v1/issues.go—formatIssueBodyWithHostingcmd/app/main.go—/static/file server route.env.example—BAUER_STATIC_BASE_URL,BAUER_S3_BUCKET,BAUER_S3_REGIONHow to Review
git diff feat/phase-5-auth-security..feat/figma-phase-f-api -- .Part of the Bauer v2 stacked PR series (Branch 12 of 12).