Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
c071d08
Removed bold from Link
xMrAfonso Apr 13, 2025
1bf780f
feat: update styles and enhance layout across components
xMrAfonso Apr 13, 2025
3bcb51e
Merge branch 'HangarMC:staging' into frontend-redesign
xMrAfonso May 3, 2025
b865d6d
style: Changed some padding, etc.
xMrAfonso May 3, 2025
c538274
feat: Added Collapsible Cards
xMrAfonso May 3, 2025
b182df6
refactor: Changed the clear message.
xMrAfonso May 3, 2025
4d1a04f
refactor: Cleaned config and added supportedPlatforms to ProjectCompact.
xMrAfonso May 3, 2025
171085b
feat: Added a collapse transition
xMrAfonso May 3, 2025
aeff843
feat: Changed layout a bit, added platform filter and made all filter…
xMrAfonso May 3, 2025
4699a68
style: Made some adjustments to fit the new style
xMrAfonso May 3, 2025
cc7449c
refactor: Changed clear message to 'Clear'
xMrAfonso May 4, 2025
f3014ca
style: Changed styling of tooltip
xMrAfonso May 4, 2025
2c6f53d
feat: added a way to provide elements to the title (for clear button …
xMrAfonso May 4, 2025
51badf7
feat: Made tags and categories cards collapsible and clearable.
xMrAfonso May 4, 2025
6fbf0c9
style: copied properties from radio inputs
xMrAfonso May 4, 2025
3fcc7f8
refactor: Changed fonts to @nuxt/fonts
xMrAfonso May 4, 2025
7c948e3
refactor: Changed clear button
xMrAfonso May 5, 2025
8a8f070
refactor: Changed span to buttons to respect HTML semantics
xMrAfonso May 5, 2025
7352352
style: Made sure cards have the same padding in all sides
xMrAfonso May 5, 2025
ded1f1d
refactor: changed pointer logic a bit
xMrAfonso May 8, 2025
5fc397f
refactor: Removed progress bar and spinner on load. Skeletons are a t…
xMrAfonso May 8, 2025
32db418
style: Improved Skeletons and list animation.
xMrAfonso May 8, 2025
9905b69
refactor: Removed Spinner component (forgot to do it)
xMrAfonso May 8, 2025
c7e93b4
fix: Version no longer stays selected when the platform filter gets c…
xMrAfonso May 8, 2025
22ab5e7
Merge branch 'HangarMC:staging' into frontend-redesign
xMrAfonso May 8, 2025
199856c
style: Hover animation
xMrAfonso May 11, 2025
446268f
refactor: Added showAllVersions
xMrAfonso May 11, 2025
41e4f12
fix: Fixed scrollbar background being white on dark mode for firefox.
xMrAfonso May 11, 2025
d9dabfc
feat: Finished filters for now
xMrAfonso May 11, 2025
e82626d
refactor: Added keys required for new filters
xMrAfonso May 11, 2025
4887d52
WIP: Better search input for filters, etc.
xMrAfonso May 12, 2025
7a6df43
feat: Search icon & clear search for filters
xMrAfonso May 16, 2025
ddab1c7
style: Added checkmark to the right of buttons
xMrAfonso May 16, 2025
06080b8
style: Hopefully somewhat fixed mobile view for project cards
xMrAfonso May 16, 2025
9d0dab7
style: Adapted Button style and pagination buttons too.
xMrAfonso May 17, 2025
2a8516d
feat: Added dropdown for sort by
xMrAfonso May 24, 2025
d32de55
style: Less roundy dropdown button
xMrAfonso May 24, 2025
4638194
style: Fixed colors to use primary color
xMrAfonso May 24, 2025
1fcef06
style: Less scaling when hovering
xMrAfonso May 25, 2025
6b04d65
WIP: Header changes & Project List layout
xMrAfonso May 26, 2025
f92c5b0
WIP: Header changes, Project List layout & Authors Page
xMrAfonso Jun 2, 2025
5ba01f1
Merge remote-tracking branch 'refs/remotes/origin/staging' into front…
xMrAfonso Aug 1, 2025
432d88e
Merge branch 'HangarMC:staging' into frontend-redesign
xMrAfonso Aug 2, 2025
73fd44d
fix: make sure scheduled task can't get stuck, closes #1519
MiniDigger Oct 4, 2025
500a333
chore. nerf health check
MiniDigger Oct 4, 2025
05fdcf6
fix: only build frontend docker if building frontend
MiniDigger Oct 4, 2025
2252452
feat: scan paper-plugin.yml for prefilling versions and dependencies
MiniDigger Oct 4, 2025
50ef770
chore: update deps
MiniDigger Oct 4, 2025
8d80db9
chore: fix compile
MiniDigger Oct 4, 2025
791db68
chore: actually update dev deps
MiniDigger Oct 4, 2025
232f944
chore: fix lint
MiniDigger Oct 4, 2025
31466e7
chore: fix lint
MiniDigger Oct 4, 2025
81646c2
chore: downgraded i18n cause dum
MiniDigger Oct 4, 2025
4c1e8ee
feat: update styles and enhance layout across components
xMrAfonso Apr 13, 2025
dd80c2a
refactor: Changed fonts to @nuxt/fonts
xMrAfonso May 4, 2025
4018123
style: Improved Skeletons and list animation.
xMrAfonso May 8, 2025
8e1665a
WIP: Header changes & Project List layout
xMrAfonso May 26, 2025
edf6e74
WIP: Header changes, Project List layout & Authors Page
xMrAfonso Jun 2, 2025
1ef29dd
Post-Rebase: Pushing before I break something else
xMrAfonso Oct 24, 2025
b05f5b7
style: Fixed some small inconsistencies.
xMrAfonso Oct 24, 2025
082cb79
style: Modernized buttons to look less flat
xMrAfonso Oct 25, 2025
42b4169
feat: Added global search!
xMrAfonso Oct 25, 2025
0ac47e9
style: Modernized buttons and dropdown
xMrAfonso Oct 26, 2025
9b5f3a1
style: Small changes to text handling in cards
xMrAfonso Oct 26, 2025
59b1b60
feat: Added size list selection button, added sticky island for proje…
xMrAfonso Oct 26, 2025
379d34d
feat: Added EOL warning for waterfall
xMrAfonso Oct 26, 2025
8c1b144
style: Fixed some design stuff
xMrAfonso Oct 26, 2025
1df66df
WIP: FAQ modal
xMrAfonso Oct 26, 2025
e65f77d
style: Changed position from Waterfall EOL message.
xMrAfonso Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
steps:
# <editor-fold desc="Prepare">
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
# Assume PRs are less than 50 commits
fetch-depth: 50
Expand Down Expand Up @@ -106,9 +106,9 @@ jobs:
# <editor-fold desc="Build Backend">
- name: Set up JDK
if: ${{ steps.vars.outputs.build_backend == 'true' }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: temurin
cache: "maven"

Expand All @@ -127,9 +127,9 @@ jobs:

- name: Set up Node
if: ${{ steps.vars.outputs.build_frontend == 'true' }}
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: "22"
node-version: "24"
cache: "pnpm"
cache-dependency-path: "frontend/pnpm-lock.yaml"

Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker (frontend)
if: ${{ steps.vars.outputs.deploy == 'true' }}
if: ${{ steps.vars.outputs.build_frontend == 'true' && steps.vars.outputs.deploy == 'true' }}
id: frontend-meta
uses: docker/metadata-action@v5
with:
Expand All @@ -191,7 +191,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push frontend Dockerfile
if: ${{ steps.vars.outputs.deploy == 'true' }}
if: ${{ steps.vars.outputs.build_frontend == 'true' && steps.vars.outputs.deploy == 'true' }}
uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -203,7 +203,7 @@ jobs:
cache-to: type=gha,mode=max

- name: Extract metadata (tags, labels) for Docker (backend)
if: ${{ steps.vars.outputs.deploy == 'true' }}
if: ${{ steps.vars.outputs.build_backend == 'true' && steps.vars.outputs.deploy == 'true' }}
id: backend-meta
uses: docker/metadata-action@v5
with:
Expand All @@ -213,7 +213,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push backend Dockerfile
if: ${{ steps.vars.outputs.deploy == 'true' }}
if: ${{ steps.vars.outputs.build_backend == 'true' && steps.vars.outputs.deploy == 'true' }}
uses: docker/build-push-action@v6
with:
context: .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ jobs:
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '22'
node-version: '24'

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 8
version: 10

- name: Get pnpm store directory
id: pnpm-cache
Expand Down
22 changes: 11 additions & 11 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.4</version>
<version>3.5.6</version>
<relativePath/>
</parent>

Expand All @@ -26,23 +26,23 @@
<project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>

<!-- dependency management -->
<jdbi3-bom.version>3.49.5</jdbi3-bom.version>
<jdbi3-bom.version>3.49.6</jdbi3-bom.version>
<configurate.version>4.2.0</configurate.version>
<spring-cloud-aws.version>3.4.0</spring-cloud-aws.version>

<!-- dependencies -->
<sentry.version>8.18.0</sentry.version>
<springdoc.version>2.8.9</springdoc.version>
<sentry.version>8.23.0</sentry.version>
<springdoc.version>2.8.13</springdoc.version>
<jsitemapgenerator.version>4.5</jsitemapgenerator.version>
<org-json.version>20250517</org-json.version>
<bucket4j.version>8.14.0</bucket4j.version>
<datafaker.version>2.4.4</datafaker.version>
<apache-commons-lang.version>3.18.0</apache-commons-lang.version>
<bucket4j.version>8.15.0</bucket4j.version>
<datafaker.version>2.5.1</datafaker.version>
<apache-commons-lang.version>3.19.0</apache-commons-lang.version>
<jwt.version>4.5.0</jwt.version>
<jetbrains-annotations.version>26.0.2</jetbrains-annotations.version>
<jetbrains-annotations.version>26.0.2-1</jetbrains-annotations.version>
<caffeine.version>3.2.2</caffeine.version>
<jarscanner.version>1.0-SNAPSHOT</jarscanner.version>
<jgroups.version>5.4.8.Final</jgroups.version>
<jgroups.version>5.4.11.Final</jgroups.version>
<jgroups-kube.version>2.0.2.Final</jgroups-kube.version>
<totp.version>1.8.0</totp.version>
<webp.version>0.1.6</webp.version>
Expand All @@ -54,11 +54,11 @@

<!-- test -->
<testcontainer.version>1.21.3</testcontainer.version>
<openapi-generator.version>7.14.0</openapi-generator.version>
<openapi-generator.version>7.16.0</openapi-generator.version>
<argLine/>

<!-- plugins -->
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public void checkAndProcess() {
this.executorService.submit(this::process);
}
}
final long stuckJobs = this.jobsDAO.fixStuckJobs();
if (stuckJobs > 0) {
this.logger.warn("Fixed {} stuck jobs", stuckJobs);
}
}

public List<JobTable> getErroredJobs() {
Expand Down Expand Up @@ -141,7 +145,7 @@ private void processJob(final JobTable job) throws Exception {
this.jobsDAO.retryIn(job.getId(), OffsetDateTime.now().plus(scheduledTaskJob.getInterval(), ChronoUnit.MILLIS), null, null);
} catch (final Exception ex) {
// scheduled tasks get special error handling
this.logger.debug("scheduled job failed to process: {} {}", ex.getMessage(), job, ex);
this.logger.warn("scheduled job failed to process: {} {}", ex.getMessage(), job, ex);
final String error = "Encountered error when processing scheduled job\n" +
this.toJobString(job) +
"Exception: " + ex.getClass().getName() + "\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,11 @@ public interface JobsDAO {

@SqlQuery("SELECT * FROM jobs WHERE id = :jobId")
JobTable getJob(long jobId);

@SqlUpdate("""
UPDATE jobs
SET state = 'not_started'
WHERE state = 'started' AND (last_updated < now() - INTERVAL '15 minutes');
""")
long fixStuckJobs();
}
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ OpenApiWebMvcResource openApiResource(final ObjectFactory<OpenAPIService> openAP
operationParser,
springDocConfigProperties, springDocProviders,
new SpringDocCustomizers(Optional.of(groupedOpenApi.getOpenApiCustomizers()), Optional.of(groupedOpenApi.getOperationCustomizers()),
Optional.of(groupedOpenApi.getRouterOperationCustomizers()), Optional.of(groupedOpenApi.getOpenApiMethodFilters()))
Optional.of(groupedOpenApi.getRouterOperationCustomizers()), Optional.of(groupedOpenApi.getOpenApiMethodFilters()), Optional.empty(), Optional.empty())

)).orElseThrow(RuntimeException::new);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ public ArrayNode getStats(@RequestParam(required = false) @DateTimeFormat(iso =
@PermissionRequired(NamedPermission.VIEW_HEALTH)
@GetMapping(path = "/health", produces = MediaType.APPLICATION_JSON_VALUE)
public HealthReport getHealthReport() {
final List<UnhealthyProject> staleProjects = this.healthService.getStaleProjects();
final List<MissingFileCheck> missingFiles = this.healthService.getVersionsWithMissingFiles();
final List<UnhealthyProject> nonPublicProjects = this.healthService.getNonPublicProjects();
// TODO make health report less slow
final List<UnhealthyProject> staleProjects = List.of(); // this.healthService.getStaleProjects();
final List<MissingFileCheck> missingFiles = List.of(); //this.healthService.getVersionsWithMissingFiles();
final List<UnhealthyProject> nonPublicProjects = List.of(); //this.healthService.getNonPublicProjects();
final List<JobTable> erroredJobs = this.jobService.getErroredJobs();
return new HealthReport(staleProjects, missingFiles, nonPublicProjects, erroredJobs);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package io.papermc.hangar.service.internal.versions.plugindata.handler;

import io.papermc.hangar.model.api.project.version.PluginDependency;
import io.papermc.hangar.model.common.Platform;
import io.papermc.hangar.service.internal.versions.plugindata.handler.BukkitFileTypeHandler.BukkitFileData;
import java.io.BufferedReader;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.stream.Collectors;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.configurate.ConfigurateException;
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
import org.spongepowered.configurate.objectmapping.meta.Setting;
import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
import org.springframework.stereotype.Component;

@Component
public class BukkitFileTypeHandler extends FileTypeHandler<BukkitFileData> {

protected BukkitFileTypeHandler() {
super("plugin.yml", Platform.PAPER);
}

@Override
public BukkitFileData getData(final BufferedReader reader) throws ConfigurateException {
return YamlConfigurationLoader.builder().buildAndLoadString(reader.lines().collect(Collectors.joining("\n"))).get(BukkitFileData.class);
}

@ConfigSerializable
public static class BukkitFileData extends FileTypeHandler.FileData {

@Setting("depend")
private List<String> hardDepends;
@Setting("softdepend")
private List<String> softDepends;
@Setting("api-version")
private String apiVersion;

@Override
public @NotNull SortedSet<String> getPlatformDependencies() {
final SortedSet<String> platformVersions = new TreeSet<>();
if (this.apiVersion != null) {
platformVersions.add(this.apiVersion);
}
return platformVersions;
}

@Override
protected @NotNull Set<PluginDependency> createPluginDependencies() {
final Set<PluginDependency> dependencies = new HashSet<>();
if (this.hardDepends != null) {
for (final String hardDepend : this.hardDepends) {
dependencies.add(PluginDependency.of(hardDepend, true, Platform.PAPER));
}
}
if (this.softDepends != null) {
for (final String softDepend : this.softDepends) {
dependencies.add(PluginDependency.of(softDepend, false, Platform.PAPER));
}
}
return dependencies;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.io.BufferedReader;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
Expand All @@ -21,7 +22,7 @@
public class PaperFileTypeHandler extends FileTypeHandler<PaperFileData> {

protected PaperFileTypeHandler() {
super("plugin.yml", Platform.PAPER);
super("paper-plugin.yml", Platform.PAPER);
}

@Override
Expand All @@ -30,12 +31,10 @@ public PaperFileData getData(final BufferedReader reader) throws ConfigurateExce
}

@ConfigSerializable
public static class PaperFileData extends FileTypeHandler.FileData {
public static class PaperFileData extends FileData {

@Setting("depend")
private List<String> hardDepends;
@Setting("softdepend")
private List<String> softDepends;
@Setting("dependencies")
private Map<String, Map<String, Dependency>> dependencies;
@Setting("api-version")
private String apiVersion;

Expand All @@ -51,17 +50,19 @@ public static class PaperFileData extends FileTypeHandler.FileData {
@Override
protected @NotNull Set<PluginDependency> createPluginDependencies() {
final Set<PluginDependency> dependencies = new HashSet<>();
if (this.hardDepends != null) {
for (final String hardDepend : this.hardDepends) {
dependencies.add(PluginDependency.of(hardDepend, true, Platform.PAPER));
}
}
if (this.softDepends != null) {
for (final String softDepend : this.softDepends) {
dependencies.add(PluginDependency.of(softDepend, false, Platform.PAPER));
if (this.dependencies != null) {
for (final Map.Entry<String, Map<String, Dependency>> entry : this.dependencies.entrySet()) {
for (final Map.Entry<String, Dependency> dependencyEntry : entry.getValue().entrySet()) {
final String dependencyName = dependencyEntry.getKey();
final boolean required = dependencyEntry.getValue().required;
dependencies.add(PluginDependency.of(dependencyName, required, Platform.PAPER));
}
}
}
return dependencies;
}

@ConfigSerializable
record Dependency(boolean required) {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import io.papermc.hangar.model.common.Platform;
import io.papermc.hangar.service.internal.versions.plugindata.handler.VelocityFileTypeHandler.VelocityFileData;
import java.io.BufferedReader;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -36,23 +35,6 @@ public static class VelocityFileData extends FileTypeHandler.FileData {
}

@ConfigSerializable
static class Dependency {

private String id;
private boolean optional;

@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || this.getClass() != o.getClass()) return false;
final Dependency that = (Dependency) o;
return this.optional == that.optional && this.id.equals(that.id);
}

@Override
public int hashCode() {
return Objects.hash(this.id, this.optional);
}
}
record Dependency(String id, boolean optional) {}
}
}
Loading