Skip to content

ui/components: add PreviewBanner with commit hash for coolify [beta] - #2640

Merged
plowsof merged 1 commit into
monero-project:betafrom
plowsof:coolify-hash-header
Apr 28, 2026
Merged

ui/components: add PreviewBanner with commit hash for coolify [beta]#2640
plowsof merged 1 commit into
monero-project:betafrom
plowsof:coolify-hash-header

Conversation

@plowsof

@plowsof plowsof commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator

coolify sets SOURCE_COMMIT env var by default. I have manually set the env COOLIFY_PREVIEW to true for preview deploys, but not for production

styles can be added e.g. background colour

the variable can/should be generic? i seen a nice looking default var called NODE_ENV but coolify has this set to production in both deploy and previews

proof of concept to show the commit hash on previews

  • linting todo

@github-actions

Copy link
Copy Markdown
What Link
🕵️‍♂️ Review Files changed
🌐 Deploy Preview #2640

@plowsof plowsof changed the title header: show commit hash on preview deployments header: show commit hash on preview deployments [beta] Apr 25, 2026
@redsh4de

redsh4de commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

i like this

this can be made as a component in components/ui/header/PreviewBanner.astro, and imported in the main header

then it can own its own functions & styles

@plowsof
plowsof force-pushed the coolify-hash-header branch from 4cc745e to b0ca0be Compare April 26, 2026 21:00
@plowsof plowsof changed the title header: show commit hash on preview deployments [beta] ui/components: add PreviewBanner with commit hash for coolify [beta] Apr 26, 2026
@plowsof

plowsof commented Apr 26, 2026

Copy link
Copy Markdown
Collaborator Author

i ended up putting it in Layout to try to not have it interfere with the UI with no success. I then realised it should be fixed at the bottom just like how netlify displays something similar without messing with the UI, so im not sure where it should go now.

coolify has another default var COOLIFY_BRANCH which contains the pr number - this allows us to have a direct link to the commit

astro? sometimes {var} sometimes {${var}}{var} 🤷

TODO: move the banner element inside the html block for linting

@plowsof plowsof added the beta label Apr 26, 2026
@plowsof
plowsof marked this pull request as ready for review April 27, 2026 13:18
Comment thread src/components/ui/PreviewBanner.astro Outdated
Update PreviewBanner.astro with design tokens from styles/global.css:

Co-authored-by: redsh4de <25299353+redsh4de@users.noreply.github.com>
@plowsof
plowsof force-pushed the coolify-hash-header branch from 752a0e8 to 6e11f8f Compare April 27, 2026 19:17
@plowsof
plowsof merged commit 98f119a into monero-project:beta Apr 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants