Skip to content

[MASTER] refactor: move the UI into a specific folder - #26

Merged
ysavicsh merged 2 commits into
masterfrom
refactor/move-ui-into-app-folder
Oct 19, 2026
Merged

ysavicsh merged 2 commits into
masterfrom
refactor/move-ui-into-app-folder

Conversation

@ysavicsh

@ysavicsh ysavicsh commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

I moved the ui into a specific folder to be able to use the example in different environments


Note

Medium Risk
Touches regulated/public API request paths and mTLS request setup (including removal of commented CA config); behavior changes are mostly defensive but affect how API errors propagate to the UI.

Overview
Reorganizes the demo UI under app/ and shared helpers under lib/utils, updating imports (e.g. pages/index.tsx → app/containers/App) so the example can be run in different environments.

Enables strictNullChecks and aligns React state / FeatureParams types (string | null, optional auth state). Feature components now surface axios failures safely via err.response?.data ?? err.message.

Server-side: convertObjectToString is centralized in server/request/index.ts for public and regulated clients; publicApiRequest handles missing responses; regulatedRequest guards content-type parsing; main.ts validates redirectUri pathname. Adds run:prod, ignores local config.json / example configs in .gitignore, and bumps qs in the lockfile.

Reviewed by Cursor Bugbot for commit 0dc575d. Bugbot is set up for automated code reviews on this repo. Configure here.

@ysavicsh ysavicsh self-assigned this Oct 16, 2026
@ysavicsh
ysavicsh marked this pull request as ready for review October 16, 2026 09:00
@ysavicsh
ysavicsh requested a review from a team as a code owner October 16, 2026 09:00

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread package.json Resolved
@ysavicsh
ysavicsh force-pushed the refactor/move-ui-into-app-folder branch from 0d0cf60 to a876764 Compare October 16, 2026 09:49

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a876764. Configure here.

Comment thread server/request/publicApiRequest.ts Resolved
@ysavicsh
ysavicsh enabled auto-merge October 16, 2026 13:45
Route handlers send any resolved shineRequest value as HTTP 200, so a missing Axios response was shown as successful output.
Comment thread server/request/index.ts

export const shineRequest = isPublicAPI ? publicApiRequest : regulatedRequest;

export const convertObjectToString = (payload: unknown) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There seems to be a circular import here (publicApiRequest.ts imports this function from index.ts and index.ts imports publicApiRequest().

Claude tells me that this is not an issue currently because of the tsconfig file and the module: esnext flag, but I still think it might be better to put this in its own utils.ts or convertObjectToString.ts file to completely prevent any future issue that might arise when editing this code.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Taking a step back and realizing the purpose of this repo, it might not be a huge issue either 🫣

I'll approve this and let you be the judge and make the change if you feel like it's needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh yes it's an example of Shine connect integration 🤣

@ysavicsh
ysavicsh merged commit dde8c06 into master Oct 19, 2026
2 checks passed
@ysavicsh
ysavicsh deleted the refactor/move-ui-into-app-folder branch October 19, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants