DEV Community

Hitesh Sachdeva
Hitesh Sachdeva

Posted on

Release 0.4 Final: Reflecting on My Open Source Contributions for release 0.4

Overview

Over the past two weeks, I worked on two meaningful contributions to open-source projects. This final blog post summarizes my work, discusses the results, and reflects on what I learned throughout Release 0.4.

Project Issue Type PR Status
OpenCTI #13594 New Feature PR #13608 - Submitted
Nextcloud Desktop #9197 Bug Fix PR #9206 - Discussion with Maintainer

Contribution 1: OpenCTI - Configurable Export Timeout

The Problem

OpenCTI's data export feature had a hardcoded 20-minute timeout. For organizations with large threat intelligence datasets, exports would fail before completing. Administrators had no way to change this without modifying the source code.

Issue: https://github.com/OpenCTI-Platform/opencti/issues/13594

My Solution

I made the export timeout configurable through platform settings:

  1. Added platform_export_timeout field to the GraphQL schema
  2. Modified workToExportFile() to read timeout from settings
  3. Implemented a fallback to 20 minutes for backward compatibility
  4. Updated all function callers to handle the async changes

Pull Request: https://github.com/OpenCTI-Platform/opencti/pull/13608

Technical Highlights

// Read timeout from platform settings with fallback
const settings = await getEntityFromCache(context, ENTITY_TYPE_SETTINGS);
const timeout = settings.platform_export_timeout || 20; // Default 20 minutes
Enter fullscreen mode Exit fullscreen mode

Result

The pull request is currently under review. I have responded to initial feedback and am awaiting final approval from the maintainers.

Contribution 2: Nextcloud Desktop - Folder Icon Fix

The Problem

On Windows, custom folder icons were being reset every time Nextcloud synced files. Users who organized their folders with custom icons would lose them after every sync operation.

Issue: https://github.com/nextcloud/desktop/issues/9197

Root Cause

Windows custom folder icons require:

  • A desktop.ini file inside the folder
  • The FILE_ATTRIBUTE_SYSTEM flag on the folder

The Nextcloud CFAPI wrapper was overwriting file attributes during sync, losing the FILE_ATTRIBUTE_SYSTEM flag.

My Solution

I modified cfapiwrapper.cpp to preserve existing file attributes before updating placeholders:

// Preserve existing file attributes (especially FILE_ATTRIBUTE_SYSTEM)
const auto currentAttributes = GetFileAttributesW(path.utf16());
if (currentAttributes != INVALID_FILE_ATTRIBUTES) {
    metadata.BasicInfo.FileAttributes = currentAttributes;
}
Enter fullscreen mode Exit fullscreen mode

Pull Request: https://github.com/nextcloud/desktop/pull/9206

Result

The pull request is currently under review. I have responded to initial feedback and am awaiting final approval from the maintainers.

Skills I Developed

Technical Skills

  • GraphQL Schema Design: Learned how to extend GraphQL schemas and propagate changes through a large application
  • Windows API Programming: Gained hands-on experience with GetFileAttributesW() and the Cloud Files API (CFAPI)
  • C++ Development: Navigated and contributed to a large C++ codebase for the first time
  • Caching Systems: Understood how platform settings and caching work in enterprise applications

Soft Skills

  • Code Reading: Improved my ability to understand unfamiliar codebases quickly
  • Technical Communication: Wrote clear PR descriptions and responded professionally to review feedback
  • Project Navigation: Learned to find relevant code in large repositories with hundreds of files

Challenges and How I Overcame Them

Challenge 1: Complex Build Environments

Nextcloud Desktop required Qt6, KDE libraries, and other dependencies. Setting up the build environment on Windows was difficult.

Solution: I focused on understanding the code thoroughly and ensuring my changes were correct based on existing patterns, even without a full local build.

Challenge 2: Understanding New APIs

Both the Windows CFAPI and OpenCTI's caching system were completely new to me.

Solution: I spent time reading official documentation, studying existing code patterns, and tracing through function calls to build understanding.

Challenge 3: Following Project Conventions

Each project had its own coding style, PR templates, and contribution guidelines.

Solution: I carefully read contribution guides and studied recent merged PRs to match the expected format and style.

Key Takeaways

  1. Read before you write. Understanding existing code patterns is essential before making changes.

  2. Backward compatibility matters. Always provide sensible defaults so existing users are not affected.

  3. Small changes can have big impact. Both my contributions were relatively small in terms of lines of code, but they solved real problems for real users.

  4. Open source is collaborative. Engaging with maintainers and responding to feedback is just as important as writing good code.

  5. Challenge yourself. Working on C++ and Windows APIs pushed me outside my comfort zone, but that is where the most learning happens.

What I Would Do Differently

If I were starting Release 0.4 again, I would:

  • Set up build environments earlier to allow for local testing
  • Start exploring issues sooner to have more time for complex contributions
  • Engage more with the project communities through discussion forums or chat channels

Conclusion

Release 0.4 was a significant step forward in my open-source journey. I moved beyond simple fixes to contribute a new feature and a meaningful bug fix to two established projects. The Pr's are progressing through review.

More importantly, I gained confidence in my ability to contribute to unfamiliar codebases and technologies. Whether it is JavaScript, GraphQL, C++, or Windows APIs, the core skills of reading code, understanding systems, and communicating clearly remain the same.

I am proud of what I accomplished and excited to continue contributing to open source in the future.

Links

OpenCTI:

Nextcloud Desktop:

Top comments (0)