Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6c65e2b
feat: simple test server
LynxLynxx Apr 22, 2025
dd97426
feat: add unique key for AfterProposalSubmissionPage to prevent servi…
LynxLynxx Apr 23, 2025
3c36611
Merge branch 'main' into fix/2308-cache-proposal-submission
LynxLynxx Apr 23, 2025
0aa3257
feat: adding collapseable feature to list of user proposal
LynxLynxx Apr 23, 2025
c858029
Merge branch 'main' into fix/2308-cache-proposal-submission
LynxLynxx Apr 24, 2025
4e51880
Merge branch 'fix/2308-cache-proposal-submission' of github.com:input…
LynxLynxx Apr 24, 2025
26e2491
feat: make index remove cache after deploying
LynxLynxx Apr 25, 2025
059bee1
feat: update nginx config with cache control and cross-origin headers…
LynxLynxx Apr 25, 2025
1d98d89
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk Apr 29, 2025
673b483
Merge branch 'main' into fix/2308-cache-proposal-submission
LynxLynxx Apr 29, 2025
a75ade1
Merge branch 'main' into fix/2308-cache-proposal-submission
LynxLynxx Apr 29, 2025
3646807
chore: refine nginx configuration to prevent browser cache problems
dt-iohk Apr 29, 2025
02a0f6c
chore: make cache expire after 1hr
dt-iohk Apr 29, 2025
f759f3b
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk Apr 29, 2025
9bb1254
chore: update nginx conf in blueprint
dt-iohk Apr 29, 2025
b0213f3
Merge branch 'fix/2308-cache-proposal-submission' of https://github.c…
dt-iohk Apr 29, 2025
2b230aa
chore: formatting
dt-iohk Apr 29, 2025
a305636
Merge branch 'main' into fix/2308-cache-proposal-submission
LynxLynxx Apr 30, 2025
64fadc0
feat: remove unused elements
LynxLynxx Apr 30, 2025
a8538d9
Merge branch 'main' into fix/2308-cache-proposal-submission
LynxLynxx Apr 30, 2025
9cd9c59
Merge branch 'fix/2308-cache-proposal-submission' of github.com:input…
LynxLynxx Apr 30, 2025
10fed31
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk Apr 30, 2025
994b1e8
Merge branch 'main' into fix/2308-cache-proposal-submission
minikin May 1, 2025
262c7f0
chore: update ci version
dt-iohk May 2, 2025
ac54743
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk May 2, 2025
1391bbd
chore: remove SENTRY_DSN arg
dt-iohk May 2, 2025
937c830
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk May 2, 2025
f5f95ab
chore: update ci to v3.4.2
dt-iohk May 2, 2025
eadc834
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk May 2, 2025
46d9014
Merge branch 'fix/2308-cache-proposal-submission' of github.com:input…
LynxLynxx May 2, 2025
e813a8c
chore: undo remove comment
LynxLynxx May 2, 2025
829b791
Merge branch 'main' into fix/2308-cache-proposal-submission
LynxLynxx May 2, 2025
55a4446
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk May 2, 2025
f68c557
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk May 2, 2025
a0938da
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk May 5, 2025
f41c0d5
Merge branch 'main' into fix/2308-cache-proposal-submission
LynxLynxx May 5, 2025
3420fa7
chore: cleanup
dt-iohk May 5, 2025
8fe48e6
Merge branch 'main' into fix/2308-cache-proposal-submission
dt-iohk May 5, 2025
bae2c4e
Merge branch 'main' into fix/2308-cache-proposal-submission
LynxLynxx May 5, 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
6 changes: 3 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.4.0 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.4.0 AS cspell-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.4.0 AS postgresql-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.4.2 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.4.2 AS cspell-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.4.2 AS postgresql-ci

FROM debian:stable-slim

Expand Down
2 changes: 1 addition & 1 deletion catalyst-gateway/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.4.0 AS rust-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.4.2 AS rust-ci
IMPORT ../ AS repo-ci

#cspell: words rustfmt toolsets USERARCH stdcfgs
Expand Down
2 changes: 1 addition & 1 deletion catalyst-gateway/event-db/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# the database and its associated software.
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.4.0 AS postgresql-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.4.2 AS postgresql-ci

# cspell: words

Expand Down
2 changes: 1 addition & 1 deletion catalyst-gateway/tests/Earthfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION 0.8
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:v3.4.0 AS spectral-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:v3.4.2 AS spectral-ci
IMPORT .. AS gateway

docker-compose:
Expand Down
2 changes: 1 addition & 1 deletion catalyst-gateway/tests/api_tests/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.4.0 AS python-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.4.2 AS python-ci
IMPORT github.com/input-output-hk/catalyst-libs/rust:r20250425-00 AS cat-libs-rust

builder:
Expand Down
5 changes: 2 additions & 3 deletions catalyst_voices/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ VERSION 0.8

IMPORT ../ AS repo-ci
IMPORT ../catalyst-gateway AS catalyst-gateway
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.4.0 AS flutter-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.4.2 AS flutter-ci

# repo-catalyst-voices - Creates artifacts of all configuration files,
# packages and folders related to catalyst_voices frontend.
Expand Down Expand Up @@ -117,13 +117,12 @@ build-static-analysis:
build-web:
FROM +code-generator
ARG RUN_ON_PR=true
ARG SENTRY_DSN

ARG WORKDIR=/frontend/apps/voices
IF [ $RUN_ON_PR = true ]
DO flutter-ci+BUILD_WEB --WORKDIR=$WORKDIR --BUILD_MODE='--profile' --TARGET=lib/configs/main_web.dart
ELSE
DO flutter-ci+BUILD_WEB --WORKDIR=$WORKDIR --TARGET=lib/configs/main_web.dart --SENTRY_DSN=$SENTRY_DSN
DO flutter-ci+BUILD_WEB --WORKDIR=$WORKDIR --TARGET=lib/configs/main_web.dart
SAVE ARTIFACT web
END

Expand Down
6 changes: 6 additions & 0 deletions catalyst_voices/blueprint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,17 @@ project: {
add_header Cross-Origin-Opener-Policy "same-origin";
add_header Cross-Origin-Embedder-Policy "require-corp";

# Enforce browser to always check with server whether the app static files are up-to-date.
add_header 'Cache-Control' 'must-revalidate';
expires 1h;
etag on;

location / {
root /app;
index index.html;
try_files $uri $uri/ /index.html;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
Expand Down
6 changes: 6 additions & 0 deletions catalyst_voices/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ http {
add_header Cross-Origin-Opener-Policy "same-origin";
add_header Cross-Origin-Embedder-Policy "require-corp";

# Enforce browser to always check with server whether the app static files are up-to-date.
add_header 'Cache-Control' 'must-revalidate';
expires 1h;
etag on;

location / {
root /app;
index index.html;
try_files $uri $uri/ /index.html;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,23 @@ final _logger = Logger('CampaignStageCubit');

class CampaignStageCubit extends Cubit<CampaignStageState> {
final CampaignService _campaignService;
late Timer? _timer;

CampaignStageCubit(this._campaignService)
: super(const ProposalSubmissionStage()) {
: super(const LoadingCampaignStage()) {
unawaited(getCampaignStage());
}

@override
Future<void> close() async {
_timer?.cancel();
_timer = null;
await super.close();
}

Future<void> getCampaignStage() async {
try {
emit(const LoadingCampaignStage());
final campaignTimeline = await _campaignService.getCampaignTimeline();

final now = DateTime.now();
Expand All @@ -31,6 +40,7 @@ class CampaignStageCubit extends Cubit<CampaignStageState> {

if (proposalSubmissionStage.timeline.isInRange(now)) {
emit(const ProposalSubmissionStage());
_startCountdownTimer(proposalSubmissionStage.timeline.to);
} else if (proposalSubmissionStage.timeline.isBeforeRange(now)) {
emit(
PreProposalSubmissionStage(
Expand All @@ -50,4 +60,18 @@ class CampaignStageCubit extends Cubit<CampaignStageState> {
void proposalSubmissionStarted() {
emit(const ProposalSubmissionStage());
}

void _startCountdownTimer(DateTime? endTime) {
if (endTime == null) {
return;
}
_timer?.cancel();
_timer = Timer.periodic(const Duration(seconds: 1), (timer) {
final now = DateTime.now();
if (now.isAfter(endTime)) {
timer.cancel();
emit(const AfterProposalSubmissionStage());
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ final class ErrorSubmissionStage extends CampaignStageState {
List<Object?> get props => [...super.props, error];
}

final class LoadingCampaignStage extends CampaignStageState {
const LoadingCampaignStage();
}

final class PreProposalSubmissionStage extends CampaignStageState {
final DateTime? startDate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.4.0 AS flutter-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/playwright:v3.4.0 AS playwright-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.4.2 AS flutter-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/playwright:v3.4.2 AS playwright-ci

deps:
DO playwright-ci+SETUP --workdir=/wallet-automation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.4.0 AS flutter-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter_rust_bridge:v3.4.0 AS flutter_rust_bridge
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.4.2 AS flutter-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter_rust_bridge:v3.4.2 AS flutter_rust_bridge

builder:
FROM flutter_rust_bridge+builder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.4.0 AS rust-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.4.2 AS rust-ci
IMPORT ../ AS flutter-rust-bridge

# builder : Setup the builder
Expand Down
2 changes: 1 addition & 1 deletion catalyst_voices/utilities/uikit_example/Earthfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION 0.8

IMPORT ../../ AS catalyst-voices
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.4.0 AS flutter-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.4.2 AS flutter-ci

# local-build-web - build web version of UIKit example.
# Prefixed by "local" to make sure it's not auto triggered, the target was
Expand Down
2 changes: 1 addition & 1 deletion docs/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.4.0 AS docs-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.4.2 AS docs-ci

IMPORT .. AS repo
IMPORT ../catalyst-gateway AS catalyst-gateway
Expand Down
2 changes: 1 addition & 1 deletion utilities/docs-preview/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.4.0 AS docs-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.4.2 AS docs-ci


# update-docs-dev-script: get the latest docs dev script from CI.
Expand Down
Loading