Skip to content

Commit d2efaee

Browse files
authored
Add GEMINI.md and update README.md (#179)
1 parent ede19e0 commit d2efaee

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed

current_results_ui/GEMINI.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Gemini Project Context
2+
3+
This file provides essential context about the `current_results_ui` project for the Gemini CLI.
4+
5+
## Project Overview
6+
7+
This is a Flutter web application designed to display the current continuous integration (CI) test results for the Dart project. It fetches and shows data from the Current Results API.
8+
9+
The application is deployed as a hosted web app on Firebase and uses Google Cloud Build for automated builds and deployments.
10+
11+
### Key Technologies
12+
13+
* **Framework:** Flutter (Web)
14+
* **Backend/Hosting:** Firebase (Authentication, Firestore, Hosting)
15+
* **CI/CD:** Google Cloud Build
16+
* **Language:** Dart
17+
18+
## Development Workflow
19+
20+
After making any code changes, the following steps should be performed to ensure code quality and consistency:
21+
22+
1. **Format Code:** Ensure consistent code style across the project.
23+
```sh
24+
dart format .
25+
```
26+
27+
2. **Analyze Code:** Check for errors, warnings, and lints.
28+
```sh
29+
flutter analyze
30+
```
31+
32+
3. **Run Tests:** Verify that all existing functionality is working as expected.
33+
```sh
34+
flutter test
35+
```
36+
37+
## Building and Running
38+
39+
### 1. Get Dependencies
40+
41+
First, ensure all project dependencies are downloaded and up-to-date.
42+
43+
```sh
44+
flutter pub get
45+
```
46+
47+
### 2. Run the Application
48+
49+
To run the application locally in a Chrome browser, use the following command:
50+
51+
```sh
52+
flutter run -d chrome --wasm
53+
```
54+
55+
### 3. Generate Mocks
56+
57+
The project uses `mockito` for testing, which requires code generation via `build_runner`. To generate the necessary mock files, run:
58+
59+
```sh
60+
dart run build_runner build --delete-conflicting-outputs
61+
```
62+
63+
### 4. Deployment (Automated)
64+
65+
Deployment is handled automatically by Google Cloud Build, as configured in `cloudbuild.yaml`. Pushes to the repository likely trigger a build and deploy the web app to Firebase Hosting. Manual deployment is not recommended but can be triggered via the `gcloud` CLI as described in the `README.md`.
66+
67+
## Development Conventions
68+
69+
* **Copyright Headers:** All new Dart source files (`.dart`) must include the following copyright header at the top of the file. The year should always be the current year (e.g., 2025 for work done in 2025, 2026 for work done in 2026, and so on).
70+
71+
```dart
72+
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
73+
// for details. All rights reserved. Use of this source code is governed by a
74+
// BSD-style license that can be found in the LICENSE file.
75+
```
76+
77+
* **Linting:** The project follows the recommended linting rules from the `package:flutter_lints/flutter.yaml` package. Custom rules and exclusions are defined in `analysis_options.yaml`.
78+
* **Firebase Integration:** The app is tightly integrated with Firebase. Configuration for hosting, emulators, and project details are located in `firebase.json` and `lib/firebase_options.dart`.
79+
* **Routing:** The application uses path-based URL routing (`usePathUrlStrategy()`) to handle different views, such as displaying results for a specific CL (changelist) and patchset.
80+
* **State Management:** The project appears to use the `provider` package for state management, as seen in `lib/main.dart`.

current_results_ui/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ A web UI displaying current test results for Dart CI
77
This web app displays results from the Current Results API in the dart-ci
88
project.
99

10+
## Development
11+
12+
Before running the application, you may need to generate mock files for tests and ensure the code is correctly formatted.
13+
14+
### Code Generation
15+
16+
This project uses `build_runner` to generate mock files for testing. To generate these files, run the following command:
17+
18+
```sh
19+
dart run build_runner build --delete-conflicting-outputs
20+
```
21+
22+
### Code Formatting
23+
24+
To ensure consistent code style, format the code using the following command:
25+
26+
```sh
27+
dart format .
28+
```
29+
1030
## Usage
1131

1232
The page is visible at

0 commit comments

Comments
 (0)